X-Git-Url: https://git.openstreetmap.org/rails.git/blobdiff_plain/95e8c63c2a3aee63c3eb21d7b70343ff1d17f652..1add511c52e21492d3dd08b5a86e1f04e73791eb:/db/migrate/054_refactor_map_bug_tables.rb diff --git a/db/migrate/054_refactor_map_bug_tables.rb b/db/migrate/054_refactor_map_bug_tables.rb index d94105035..d3839aaa8 100644 --- a/db/migrate/054_refactor_map_bug_tables.rb +++ b/db/migrate/054_refactor_map_bug_tables.rb @@ -18,13 +18,13 @@ class RefactorMapBugTables < ActiveRecord::Migration add_index :map_bug_comment, [:bug_id], :name => "map_bug_comment_id_idx" - add_foreign_key :map_bug_comment, [:bug_id], :map_bugs, [:id] - add_foreign_key :map_bug_comment, [:commenter_id], :users, [:id] + add_foreign_key :map_bug_comment, :map_bugs, :column => :bug_id, :name => "note_comments_note_id_fkey" + add_foreign_key :map_bug_comment, :users, :column => :commenter_id, :name => "note_comments_author_id_fkey" end def self.down - remove_foreign_key :map_bug_comment, [:commenter_id] - remove_foreign_key :map_bug_comment, [:bug_id] + remove_foreign_key :map_bug_comment, :users, :column => :commenter_id, :name => "note_comments_author_id_fkey" + remove_foreign_key :map_bug_comment, :map_bugs, :column => :bug_id, :name => "note_comments_note_id_fkey" remove_index :map_bugs, :name => "map_bug_comment_id_idx"