Add more util scripts

This commit is contained in:
rubenwardy
2020-01-18 23:20:34 +00:00
parent 22d02edbd8
commit 64e1805b53
7 changed files with 26 additions and 0 deletions

9
utils/create_migration.sh Executable file
View File

@@ -0,0 +1,9 @@
#!/bin/bash
# Create a database migration, and copy it back to the host.
docker exec -it contentdb_app_1 sh -c "FLASK_CONFIG=../config.cfg FLASK_APP=app/__init__.py flask db migrate"
docker exec -u root -it contentdb_app_1 sh -c "cp /home/cdb/migrations/versions/* /source/migrations/versions/"
USER=$(whoami)
sudo chown -R $USER:$USER migrations/versions