contentdb/utils/create_migration.sh

10 lines
349 B
Bash
Raw Normal View History

2020-01-19 16:51:47 +01:00
#!/bin/sh
2020-01-19 00:20:34 +01:00
# Create a database migration, and copy it back to the host.
docker exec contentdb_app_1 sh -c "FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db migrate"
2020-01-19 16:51:47 +01:00
docker exec -u root contentdb_app_1 sh -c "cp /home/cdb/migrations/versions/* /source/migrations/versions/"
2020-01-19 00:20:34 +01:00
USER=$(whoami)
sudo chown -R $USER:$USER migrations/versions