You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the addition of a binary json on disk format in sqlite, we sort of have a jsonb now.
The column type is still json, however the format in which it is stored is jsonb. Making all json fields technically jsonb. M
I believe it would be a welcome addition to have an aliased column helper called jsonb which creates a json column in sqlite.
Reasoning
Most of the time, we start off with sqlite and move to postgres.
Which requires changing all our json columns to jsonb.
Adding this alias allows us to use the same migrations across sqlite and postgres successfully.
I'm happy to take a stab at a PR if this is a welcome change.
Thank you so much for the issue but we don't take feature request on the issue tracker. We recommend you to try to implement the feature and send us a pull request or if you are in doubt if the feature will be accepts ask in the Rails Core discussion board for feedback.
With the addition of a binary json on disk format in sqlite, we sort of have a jsonb now.
The column type is still json, however the format in which it is stored is jsonb. Making all json fields technically jsonb. M
I believe it would be a welcome addition to have an aliased column helper called
jsonb
which creates a json column in sqlite.Reasoning
Most of the time, we start off with sqlite and move to postgres.
Which requires changing all our json columns to jsonb.
Adding this alias allows us to use the same migrations across sqlite and postgres successfully.
I'm happy to take a stab at a PR if this is a welcome change.
References:
https://sqlite.org/forum/forumpost/fa6f64e3dc1a5d97
I added a forum topic here as well
https://discuss.rubyonrails.org/t/add-jsonb-on-sqlite-connection-adapter-table-definition/84689
The text was updated successfully, but these errors were encountered: