X-Git-Url: https://git.openstreetmap.org./rails.git/blobdiff_plain/0d3a9ed9cb47ce3b89ea9eaffbb589f9a9ff6d22..b4be5596f5553c29831a01bd3f8cce14c5435156:/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