summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210621164210_drop_remove_on_close_from_labels.rb
diff options
context:
space:
mode:
Diffstat (limited to 'db/post_migrate/20210621164210_drop_remove_on_close_from_labels.rb')
-rw-r--r--db/post_migrate/20210621164210_drop_remove_on_close_from_labels.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/db/post_migrate/20210621164210_drop_remove_on_close_from_labels.rb b/db/post_migrate/20210621164210_drop_remove_on_close_from_labels.rb
new file mode 100644
index 00000000000..0430c8447d9
--- /dev/null
+++ b/db/post_migrate/20210621164210_drop_remove_on_close_from_labels.rb
@@ -0,0 +1,19 @@
+# frozen_string_literal: true
+
+class DropRemoveOnCloseFromLabels < ActiveRecord::Migration[6.0]
+ include Gitlab::Database::MigrationHelpers
+
+ def up
+ # Migration that adds column was reverted, but run in Gitlab SaaS stg and prod
+ return unless column_exists?(:labels, :remove_on_close)
+
+ with_lock_retries do
+ remove_column :labels, :remove_on_close
+ end
+ end
+
+ def down
+ # No rollback as the original migration was reverted in https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62056
+ # up simply removes the column from envs where the original migration was run
+ end
+end