X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/851de28303fc9c24d095b9452b862bea618ec0da..933335a0ea28f274bc7301c18611bcd90709fd99:/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..5de170ca7 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,10 @@ -require 'migrate' +require "migrate" class AddUserAndDescriptionToRedaction < ActiveRecord::Migration - def up + 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