Last active
December 22, 2015 04:49
-
-
Save chsh/6419676 to your computer and use it in GitHub Desktop.
Index to references can be specified on definition time.
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 CreateBags < ActiveRecord::Migration | |
def change | |
create_table :bags do |t| | |
t.references :user, index: true | |
t.timestamps | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment