add migrate command to opencloud script
diff --git a/planetstack/scripts/opencloud b/planetstack/scripts/opencloud
index 041f3f8..901ad80 100755
--- a/planetstack/scripts/opencloud
+++ b/planetstack/scripts/opencloud
@@ -46,9 +46,13 @@
python /opt/planetstack/manage.py syncdb --noinput
}
function evolvedb {
- echo "Syncing OpenCloud services..."
+ echo "Evolving OpenCloud services..."
python /opt/planetstack/manage.py evolve --hint --execute --noinput
}
+function migratedb {
+ echo "Migrating OpenCloud services..."
+ python /opt/planetstack/manage.py migrate
+}
function stopserver {
echo "Stopping any running OpenCloud Service(s)"
pkill -f "python.*runserver"
@@ -129,6 +133,11 @@
ensure_postgres_running
evolvedb
fi
+if [ "$COMMAND" = "migratedb" ]; then
+ stopserver
+ ensure_postgres_running
+ migratedb
+fi
if [ "$COMMAND" = "resetdb" ]; then
stopserver
dropdb