Skip to content

Commit 61f5707

Browse files
author
Marcin Endraszka
committedJul 3, 2019
Added automatic database migration to intall.sh
1 parent 034db50 commit 61f5707

File tree

2 files changed

+7
-0
lines changed

2 files changed

+7
-0
lines changed
 

‎install.sh

+3
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,9 @@ else
6969
systemctl start postgresql
7070
fi
7171

72+
echo "Checking if database needs upgrade..."
73+
PYTHONPATH=$INSTALL_DIR/lib python3 $INSTALL_DIR/lib/$APP_NAME/manage.pyc db upgrade --directory $INSTALL_DIR/lib/$APP_NAME/migrations/
74+
7275

7376
echo "Starting web server..."
7477

‎src/drovirt/migrations/alembic.ini

+4
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88
# the 'revision' command, regardless of autogenerate
99
# revision_environment = false
1010

11+
# set to 'true' to allow .pyc and .pyo files without
12+
# a source .py file to be detected as revisions in the
13+
# versions/ directory
14+
sourceless = true
1115

1216
# Logging configuration
1317
[loggers]

0 commit comments

Comments
 (0)
Please sign in to comment.