mirror of
https://github.com/overleaf/overleaf.git
synced 2024-12-04 14:07:55 -05:00
Merge pull request #916 from overleaf/sk-new-migrations
Add init script to run migrations from web
This commit is contained in:
commit
245fc120e6
1 changed files with 13 additions and 0 deletions
13
init_scripts/99_run_web_migrations.sh
Executable file
13
init_scripts/99_run_web_migrations.sh
Executable 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"
|
Loading…
Reference in a new issue