Created
February 10, 2016 03:26
-
-
Save villanuv/41bafef769e3cd260a69 to your computer and use it in GitHub Desktop.
Migration Thoughts for New Coast
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
# rails generate migration AddUserIdToTaggings user:integer:index | |
# rails generate migration AddInvestorIdToTaggings investor:integer:index | |
class AddUserIdToTaggings < ActiveRecord::Migration[5.0] | |
def change | |
add_index :taggings, :user | |
end | |
end | |
class AddInvestorIdToTaggings < ActiveRecord::Migration[5.0] | |
def change | |
add_index :taggings, :investor | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment