diff options
author | Yorick Peterse <yorick@yorickpeterse.com> | 2019-09-03 11:58:03 +0000 |
---|---|---|
committer | Yorick Peterse <yorick@yorickpeterse.com> | 2019-09-03 11:58:03 +0000 |
commit | da0a5c7cc20194b71c41bd5572717fd9ac382cf4 (patch) | |
tree | 3363e53a235b0ed7b61d25840ade06253312b159 | |
parent | aa34c693e9306445537fb6291520abceaab394c0 (diff) | |
parent | 1b81a81b9594300349ec90a710d3cfff857f6bda (diff) | |
download | gitlab-ce-da0a5c7cc20194b71c41bd5572717fd9ac382cf4.tar.gz |
Merge branch 'ab-remove-support-bot-column' into 'master'
Remove Users.support_bot column
See merge request gitlab-org/gitlab-ce!32554
-rw-r--r-- | changelogs/unreleased/ab-remove-support-bot-column.yml | 5 | ||||
-rw-r--r-- | db/post_migrate/20190902160015_remove_support_bot_column_from_users.rb | 19 | ||||
-rw-r--r-- | db/schema.rb | 2 |
3 files changed, 25 insertions, 1 deletions
diff --git a/changelogs/unreleased/ab-remove-support-bot-column.yml b/changelogs/unreleased/ab-remove-support-bot-column.yml new file mode 100644 index 00000000000..d256ded0410 --- /dev/null +++ b/changelogs/unreleased/ab-remove-support-bot-column.yml @@ -0,0 +1,5 @@ +--- +title: Remove Users.support_bot column +merge_request: 32554 +author: +type: other diff --git a/db/post_migrate/20190902160015_remove_support_bot_column_from_users.rb b/db/post_migrate/20190902160015_remove_support_bot_column_from_users.rb new file mode 100644 index 00000000000..80d69b57f5d --- /dev/null +++ b/db/post_migrate/20190902160015_remove_support_bot_column_from_users.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveSupportBotColumnFromUsers < ActiveRecord::Migration[5.2] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + return unless column_exists?(:users, :support_bot) + + remove_column :users, :support_bot + end + + def down + # no-op because the column should not exist in the previous version + end +end diff --git a/db/schema.rb b/db/schema.rb index b24558f459e..0f535e4d674 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2019_09_02_131045) do +ActiveRecord::Schema.define(version: 2019_09_02_160015) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" |