Replies: 1 comment
-
No, Sqitch cannot do this. One of the core design choices was for Sqitch to use the native SQL dialect and CLI for every database engine. It does not abstract change definition into a mini language or anything. It therefore cannot impose itself on those languages. I approach this sort of problem through code reviews and testing. In other words, less of a policy enforcement than adopting engineering practices like test first development and test coverage metrics to ensure the quality of my database. I realizes that's different than what you're going for, and I'm not sure what an alternative would be. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I'm trying to implement a two step system were destructive changes (for simplicity let's just say
DROP
of tables and columns) need to follow certain guidelines, for example the table/column to be dropped needs to start with some prefix.The idea is that if I want to destroy a table/column, I need to first create a migration to rename it to have the prefix (users -> x_users) and then in another migration, after I've validated in time that everything works fine, will actually drop the table/column.
So: is it possible to require that DROPs will only work if the table/column starts with some prefix, otherwise fail the transaction?
Thanks!
Beta Was this translation helpful? Give feedback.
All reactions