Merge pull request #916 from overleaf/sk-new-migrations

Add init script to run migrations from web
This commit is contained in:
Shane Kilkelly 2021-07-21 11:54:26 +01:00 committed by GitHub
commit 245fc120e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -0,0 +1,13 @@
#!/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"