Created
April 5, 2014 00:26
-
-
Save findchris/9985704 to your computer and use it in GitHub Desktop.
Run a single schema migration
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
| class OneOff < ActiveRecord::Migration | |
| def connection | |
| ActiveRecord::Base.establish_connection("whatever_#{Rails.env}").connection | |
| end | |
| def up | |
| puts 'up' | |
| end | |
| def down | |
| puts 'down' | |
| end | |
| end | |
| OneOff.new.migrate(:up) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment