X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/851de28303fc9c24d095b9452b862bea618ec0da..2882a65d21fd5758c2a90d1cbd808103ab7b8000:/db/migrate/20120404205604_add_user_and_description_to_redaction.rb diff --git a/db/migrate/20120404205604_add_user_and_description_to_redaction.rb b/db/migrate/20120404205604_add_user_and_description_to_redaction.rb index 05c75d37e..56ef05253 100644 --- a/db/migrate/20120404205604_add_user_and_description_to_redaction.rb +++ b/db/migrate/20120404205604_add_user_and_description_to_redaction.rb @@ -1,17 +1,8 @@ -require 'migrate' - -class AddUserAndDescriptionToRedaction < ActiveRecord::Migration - def up +class AddUserAndDescriptionToRedaction < ActiveRecord::Migration[4.2] + def change add_column :redactions, :user_id, :bigint, :null => false add_column :redactions, :description_format, :format_enum, :null => false, :default => "markdown" - add_foreign_key :redactions, [:user_id], :users, [:id] - end - - def down - remove_foreign_key :redactions, [:user_id], :users, [:id] - - remove_column :redactions, :description_format - remove_column :redactions, :user_id + add_foreign_key :redactions, :users, :name => "redactions_user_id_fkey" end end