Skip to content

Commit

Permalink
Add comment on foreign keys
Browse files Browse the repository at this point in the history
  • Loading branch information
greysteil committed May 20, 2017
1 parent d01e636 commit 9b9f9e9
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/generators/statesman/templates/create_migration.rb.erb
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ class Create<%= migration_class_name %> < ActiveRecord::Migration
t.timestamps null: false
end

# Foreign keys are optional, but highly recommended
add_foreign_key :<%= table_name %>, :<%= parent_table_name %>

add_index(:<%= table_name %>,
Expand Down

0 comments on commit 9b9f9e9

Please sign in to comment.