overleaf/server-ce/init_scripts/99_run_web_migrations.sh
2021-07-15 13:16:53 +01:00

13 lines
307 B
Bash
Executable file

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