3 ms·
It doesn't matter what tool you use, as long as you have automated migrations as part of the automated deployment process. A lot of the implementations look li
by 1337shadow 7y ago
It doesn't matter what tool you use, as long as you have automated migrations as part of the automated deployment process.
A lot of the implementations look like this:
create a migrations directory;
add an initial migration script in it;
make a migrate command to execute before service starts but after the backup.
The migrate command recipe:
create a migrations table in the db if it doesn't exist, otherwise fetch the list of migrations that have been applied inside this database;
then, apply the initial migration script if it's name is not found in the said migrations table, and insert its name in the migrations table so that it will not be executed again in this database by the migrate command.
- Bjartr 7y agoWe have an ant script that does almost exactly this