Running Rails Migrations Directly on Your Foundation Server
by dbaldwin
In some cases you’ll want to run your Rails migrations directly on your Foundation server. While in development mode you normally run the following command:
rake db:migrate
This will run any pending migrations on your development machine. While on your staging server you’ll need to tell rake which Rails environment to load. Our current provider for staging servers is Slicehost. So you’ll need to run the following command:
rake db:migrate RAILS_ENV=slicehost
This will load the proper database configuration and run your migrations.
