3 ms·
I love stored procedures but I feel the pain of source control management. I hope a system comes around to make this easy, ideally a system where you give your
by dsugarman 11y ago
I love stored procedures but I feel the pain of source control management. I hope a system comes around to make this easy, ideally a system where you give your current version number and branch when you are trying to update and it generates a sql update file, which really is just all the patches appended in order.
Ideally it would also allow you to restore to a previous point but anything that isn't purely schema related (like an UPDATE OR INSERT) probably needs to be done by hand.
- michaelbuckbee 11y agoWould something like the Rails database migration systems work for this (aka a DSL for describing common db transformation tasks with tooling to put you at the right version, rollbacks,etc.)
- jeffasinger 11y agoWhere I work we have a big directory with one file for each stored procedure. On deploy, all the stored procedures will get updated from that directory. Rolling back would consist of deploying an earlier version of the repository with the procedures in it.
- matwood 11y agoYears ago I wrote some custom scripts to do exactly this. Deploy consisted of having all of the sprocs migrate. At the time I also encrypted all of the sprocs because some admins had a hard time not making changes to live system instead of in source control.
- smadge 11y agoDoes Liquidbase[1] do what you describe? [1] http://www.liquibase.org/ http://www.liquibase.org/