Last active
December 11, 2017 18:53
-
-
Save delkopiso/cc3d8a1c6d4a2f09465783f1a6de250e to your computer and use it in GitHub Desktop.
Use and misuse of rails migrations
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 CreateFlags < ActiveRecord::Migration[5.1] | |
def change | |
create_table :flags do |t| | |
t.references :comment, foreign_key: true | |
t.references :user, foreign_key: true | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment