Last active
August 29, 2015 14:03
-
-
Save elarkin/b75f5f9ff3123d48dec7 to your computer and use it in GitHub Desktop.
Update MobileDB
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
#Fill these out, make sure there is no space immediately after the = signs | |
MOBILEDB_PATH=.... | |
SECURITY_SERVICES_PATH=.... | |
PSQL_USER=.... | |
#Upgrade Security Services | |
cd $SECURITY_SERVICES_PATH | |
git pull --ff-only | |
bundle install | |
bundle exec rake db:migrate | |
#Fix Security Services Data (If you still use mysql, comment this out and uncomment the other line) | |
psql -U $PSQL_USER -d security_development -c "UPDATE companies SET tenant_key = company_key;" | |
#mysql -u root security_development -e "UPDATE companies SET tenant_key = company_key;" | |
#Restart Security Services Cache | |
bundle exec rails runner "Rails.cache.clear" | |
#Update MobileDB code | |
cd $MOBILEDB_PATH | |
git pull --ff-only | |
bundle install | |
#Clear MobileDB cache | |
bundle exec rails runner "Rails.cache.clear" | |
#Finish upgrading MobileDB | |
bundle exec rake db:migrate db:tenant:migrate | |
#if everything went well, you now have a working MobileDB install |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment