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
Currently, .sql migration files do not support multiple commands. The entire string is passed in to clojure.java.jdbc/db-do-commands. According to the changelog, as of 2016:
db-do-commands now expects multiple commands to be be wrapped in a vector JDBC-122. The single command form is unchanged (but may be wrapped in a vector).
This behaviour is reflected when multi-command migrations are run: only the first command takes effect, and the rest are silently skipped.
One way to mitigate this could be to require sentry lines between subcommands of a given migration direction, in a similar way to how up and down direction pragmas are implemented.
On a similar vein, unfortunately, there also seems to be issues that I can't quite pin down in the application of split Clojure migrations. When running a migration with up and down functions, coast db migrate seems to be trying to pick and run the down migration instead of the up. What's odd is that the code and docs don't seem to have this wrong, so I'm not sure why this is. After digging a bit further, I think I have an idea of the culprit, dealt with in #111.
The text was updated successfully, but these errors were encountered:
Currently,
.sql
migration files do not support multiple commands. The entire string is passed in toclojure.java.jdbc/db-do-commands
. According to the changelog, as of 2016:This behaviour is reflected when multi-command migrations are run: only the first command takes effect, and the rest are silently skipped.
One way to mitigate this could be to require sentry lines between subcommands of a given migration direction, in a similar way to how
up
anddown
direction pragmas are implemented.On a similar vein, unfortunately, there also seems to be issues that I can't quite pin down in the application of split Clojure migrations. When running a migration with
up
anddown
functions,coast db migrate
seems to be trying to pick and run thedown
migration instead of theup
. What's odd is that the code and docs don't seem to have this wrong, so I'm not sure why this is. After digging a bit further, I think I have an idea of the culprit, dealt with in #111.The text was updated successfully, but these errors were encountered: