Closed michaelklishin closed 10 years ago
Yes,
the difference between SQL and non-SQL migrations is a bit ugly. Personally I prefer the 'code-driven' / 'drift-style' migrators. They are a bit more verbose but gives you maximum flexibility.
The reason for keeping the ragtime SQL migrators was for computability reasons. But I agree that it would be nice allow code-drive SQL migrators, it would make joplin more symmetric :)
Generally I don't want to go in the non-code S/C-QL direction.
For SQL, I personally like Yesql, which makes me perfectly comfortable with going code-driven all the way (since I'd put the SQL in separate files anyway). But that's just me and obviously others have different library preferences, so this may not make much sense for them.
I've started work on this task... See this branch, https://github.com/martintrojer/joplin/tree/code-driven-jdbc
I'm thinking to introduce a breaking change; the 'jdbc' type will now be the code-driven migrator and 'sql' will be the ragtime-sql one.
@martintrojer wanted to suggest doing the same. Yay!
Finally got around to do this. Change is breaking as described above.
Using plain SQL is very convenient for defining the schema but production migrations can involve modifying data in less-than-trivial ways.
Do you have any thoughts on having a separate JDBC-powered migrator that uses Clojure code instead of
.sql
files, à la Cassandra?And a related question: any interest in a file-driven CQL migrator?