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"
ensure_postgres_running
evolvedb
fi
+if [ "$COMMAND" = "migratedb" ]; then
+ stopserver
+ ensure_postgres_running
+ migratedb
+fi
if [ "$COMMAND" = "resetdb" ]; then
stopserver
dropdb