|
|
|
|
|
by pilotdeveloper
1093 days ago
|
|
1) I'm querying JSONb for that from postgresql and then the conversion to Ruby types is trivial.
2) Parameterized queries and you don't have SQL injection
3) The migration tool is a script of a few lines (bash in my case). It has a "migrations" table, it reads a list of migration files in a migration dir, check which ones don't exist in the migrations table and runs them in order. A migration file is just a .sql file My whole setup is a few lines of code. A very small library covering the first two, a small script for the third one. |
|
That said, it's awesome to hear from someone using jsonb with migrations. Most places I've seen using jsonb push responsibility for handling different schemas onto the application, which <shudder>.