Revert the AddNotifiedOfOwnActivityToUsers migration

This commit is contained in:
Robert Speicher 2017-03-15 13:58:08 -04:00
parent 68e40bd49f
commit 6ba69483bd
2 changed files with 25 additions and 1 deletions

View file

@ -0,0 +1,24 @@
class RevertAddNotifiedOfOwnActivityToUsers < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
disable_ddl_transaction!
DOWNTIME = false
def up
if our_column_exists?
remove_column :users, :notified_of_own_activity
end
end
def down
unless our_column_exists?
add_column_with_default :users, :notified_of_own_activity, :boolean, default: false
end
end
private
def our_column_exists?
column_exists?(:users, :notified_of_own_activity)
end
end

View file

@ -11,7 +11,7 @@
#
# It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170313133418) do
ActiveRecord::Schema.define(version: 20170315174634) do
# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"