Created
October 31, 2013 10:48
-
-
Save tcnksm/7247722 to your computer and use it in GitHub Desktop.
Change DB table name by ActiveRecord::Migration
This file contains 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 ChangeTableName < ActiveRecord::Migration | |
def self.up | |
rename_table :a_tables, :b_tables | |
end | |
def self.down | |
rename_table :b_tables, :a_tables | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment