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