X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/3a654c89197b40f4a623c0dd33b87b415623d97d..44629832dd0207d7b0f50b93f1d00b4373dd4d49:/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 6d259d20a..d94105035 100644 --- a/db/migrate/054_refactor_map_bug_tables.rb +++ b/db/migrate/054_refactor_map_bug_tables.rb @@ -1,9 +1,8 @@ -require 'lib/migrate' +require 'migrate' class RefactorMapBugTables < ActiveRecord::Migration def self.up create_table :map_bug_comment do |t| - t.column :id, :bigint, :null => false t.column :bug_id, :bigint, :null => false t.boolean :visible, :null => false t.datetime :date_created, :null => false @@ -15,6 +14,8 @@ class RefactorMapBugTables < ActiveRecord::Migration remove_column :map_bugs, :text + change_column :map_bug_comment, :id, :bigint + add_index :map_bug_comment, [:bug_id], :name => "map_bug_comment_id_idx" add_foreign_key :map_bug_comment, [:bug_id], :map_bugs, [:id]