run migrations when db exist

This commit is contained in:
Praveen Arimbrathodiyil 2016-04-05 12:17:23 +05:30
parent cba29a1faf
commit 2d8014dee1
2 changed files with 4 additions and 1 deletions

4
debian/changelog vendored
View file

@ -1,6 +1,8 @@
gitlab (8.5.8+dfsg-4) UNRELEASED; urgency=medium
* Tighten version requirements for dependencies
* Tighten version requirements for dependencies
* Fix permissions for uploads
* Run db:migrate when db exist
-- Pirate Praveen <praveen@debian.org> Tue, 05 Apr 2016 11:38:52 +0530

View file

@ -27,6 +27,7 @@ if [ "$(LANG=C su postgres -c "psql gitlab_production -c \"\d\"")" = \
SHELL_ROOT_PATH=/usr/share/gitlab-shell RAILS_ENV=production'
else
echo "gitlab_production database is not empty, skipping gitlab setup"
su ${gitlab_user} -s /bin/sh -c 'bundle exec rake db:migrate'
fi
echo "Precompiling assets..."