Answer the question
In order to leave comments, you need to log in
How to control stored procedures and triggers through VCS?
Good afternoon.
There is an application, all the work of which is tied to the database. Calculation, analysis, data aggregation. The logic is quite complex. Postgresql 9.4 is used as a database. The
task is to transfer part of the logic to the database itself as triggers and stored procedures.
Only I can't figure out how to control their changes via VCS? The logic changes very often and for every change it is not an option to block the migration. Who works with them, tell me how to control changes in the code of procedures? How to automate their update?
Answer the question
In order to leave comments, you need to log in
What you are looking for is called migrations.
Usually described by two methods: up / down.
up - performs a change to a newer version of the database, down - cancels these updates.
Now popular https://github.com/depesz/Versioning
Here are reports from the last pgconf in Moscow on how it is used:
pgconf.ru/paper/37
pgconf.ru/paper/44
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question