forked from External/greenlight
Patch on start script for validating the existentce of the database
This commit is contained in:
parent
81107e8492
commit
c708f19f10
@ -8,10 +8,10 @@ if [ "$RAILS_ENV" = "production" ] && [ "$DB_ADAPTER" = "postgresql" ]; then
|
|||||||
done
|
done
|
||||||
fi
|
fi
|
||||||
|
|
||||||
db_create=$(RAILS_ENV=$RAILS_ENV bundle exec rake db:create)
|
db_create="$(RAILS_ENV=$RAILS_ENV bundle exec rake db:create 2>&1)"
|
||||||
echo $db_create
|
echo $db_create
|
||||||
|
|
||||||
if [[ $db_create == *"Error"* ]]; then
|
if [[ $db_create == *"already exists"* ]]; then
|
||||||
echo ">>> Database migration"
|
echo ">>> Database migration"
|
||||||
bundle exec rake db:migrate
|
bundle exec rake db:migrate
|
||||||
else
|
else
|
||||||
|
Loading…
x
Reference in New Issue
Block a user