diff --git a/data/migrations/migration.sh b/data/migrations/migration.sh index 98a12d6ac..73100b1a8 100755 --- a/data/migrations/migration.sh +++ b/data/migrations/migration.sh @@ -35,11 +35,11 @@ down_postgres() { } gen_migrate() { - # Generate the migration to the current model. - GENMIGRATE=$1 PYTHONPATH=. alembic revision --autogenerate -m "$@" - # Generate a SQLite database with the schema as defined by the existing alembic model. GENMIGRATE=$1 PYTHONPATH=. alembic upgrade head + + # Generate the migration to the current model. + GENMIGRATE=$1 PYTHONPATH=. alembic revision --autogenerate -m "$2" } test_migrate() { @@ -59,7 +59,7 @@ if [ ! -z "$@" ] then set +e echo '> Generating Migration' - gen_migrate "mysql" + gen_migrate "mysql" "$@" set -e fi