1

I recently came across a migration system that relies on incremental numbers, so the scripts are executed in ascending order. A folder containing a few scripts might look like:

Script1.sql
...
Script1009.sql
Script1010.sql
Script1011.sql

The process of adding new scripts means checking different branches in version control to find the latest number, incrementing it by 1 and praying you don't raise a file conflict because someone did the same thing before you could push to the repo.

The only other way I know about is a dependency method: each script specifies a script it's dependent on, so the scripts are linked together in a hierarchy... which is great until someone mistakenly creates a circular dependency.

So: what other methods are there, and why are they (in)effective?

It should also be noted this is a theory question, I'm not looking for software.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.