Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add jsonb on sqlite connection adapter table definition #50841

Closed
thedumbtechguy opened this issue Jan 22, 2024 · 1 comment
Closed

Add jsonb on sqlite connection adapter table definition #50841

thedumbtechguy opened this issue Jan 22, 2024 · 1 comment

Comments

@thedumbtechguy
Copy link

thedumbtechguy commented Jan 22, 2024

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

@rafaelfranca
Copy link
Member

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.

@rafaelfranca rafaelfranca closed this as not planned Won't fix, can't repro, duplicate, stale Jan 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants