Skip to content

Instantly share code, notes, and snippets.

@villanuv
Created February 10, 2016 03:26
Show Gist options
  • Save villanuv/41bafef769e3cd260a69 to your computer and use it in GitHub Desktop.
Save villanuv/41bafef769e3cd260a69 to your computer and use it in GitHub Desktop.
Migration Thoughts for New Coast
# 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