overleaf/server-ce/init_scripts/900_run_web_migrations.sh

14 lines
304 B
Bash
Raw Permalink Normal View History

#!/usr/bin/env bash
set -euo pipefail
if [[ "${OVERLEAF_IS_SERVER_PRO:-null}" == "true" ]]; then
environment="server-pro"
else
environment="server-ce"
fi
echo "Running migrations for $environment"
cd /overleaf/services/web
npm run migrations -- migrate -t "$environment"
echo "Finished migrations"