To add a new database migration script:
-
Make sure you have head of master: git checkout master git fetch git rebase origin/master
-
Create a local branch for your change git checkout -b tmp
-
Create a file containing your upgrade script - e.g. new.sql
-
Add your upgrade script /Library/Ruby/Gems/2.6.0/gems/schema-evolution-manager-0.9.39/bin/sem-add ./new.sql git commit -m 'Add upgrade script to ...' scripts
-
Push change
To upgrade your local postgresql database:
sem-apply --host localhost --name sample --user postgres
or use the wrapper script:
./dev.rb
For more information on the schema evolution manager tools, look at schema-evolution-manager/README.md