SQL Current Documentation#
SQL Current is a free, open-source database migrations tool and scripting engine written in Python. It can work with any SQL or NoSQL database that has a Python driver.
SQL Current has a built-in scripting language, called Current Script. You use Current Script to apply updates to any number of databases using a simple SQL-like statement like this:
update databases to version 1.0.1 where environment = qa
The above command updates every database in the QA environment to version 1.0.1 using the scripts you provide. Now let’s say there’s a problem and you need to go back to the previous version. This is called a revert. In that case, you could write this command:
revert databases to version 1.0.0 where environment = qa
And all of your databases in the QA environment would go back to version 1.0.0, and you could troubleshoot the problem before trying to upgrade again.