]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20140519141742_add_join_table_between_users_and_changesets.rb
Merge pull request #31 from zerebubuth/routing-ui-tweaks-2
[rails.git] / db / migrate / 20140519141742_add_join_table_between_users_and_changesets.rb
index d07c6aae97920fde0fabe512a66bd05d66bc3f07..c23ed1f9f7ca22e1915030ef9129cd3c505259a5 100644 (file)
@@ -7,8 +7,8 @@ class AddJoinTableBetweenUsersAndChangesets < ActiveRecord::Migration
       t.column :changeset_id, :bigint, null: false
     end
 
-    add_foreign_key :changesets_subscribers, [:subscriber_id], :users, [:id]
-    add_foreign_key :changesets_subscribers, [:changeset_id], :changesets, [:id]
+    add_foreign_key :changesets_subscribers, :users, :column => :subscriber_id, :name => "changesets_subscribers_subscriber_id_fkey"
+    add_foreign_key :changesets_subscribers, :changesets, :name => "changesets_subscribers_changeset_id_fkey"
 
     add_index :changesets_subscribers, [:subscriber_id, :changeset_id], :unique => true
     add_index :changesets_subscribers, [:changeset_id]