summaryrefslogtreecommitdiff
path: root/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2021-10-20 08:43:02 +0000
committerGitLab Bot <gitlab-bot@gitlab.com>2021-10-20 08:43:02 +0000
commitd9ab72d6080f594d0b3cae15f14b3ef2c6c638cb (patch)
tree2341ef426af70ad1e289c38036737e04b0aa5007 /db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb
parentd6e514dd13db8947884cd58fe2a9c2a063400a9b (diff)
downloadgitlab-ce-d9ab72d6080f594d0b3cae15f14b3ef2c6c638cb.tar.gz
Add latest changes from gitlab-org/gitlab@14-4-stable-eev14.4.0-rc42
Diffstat (limited to 'db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb')
-rw-r--r--db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb18
1 files changed, 18 insertions, 0 deletions
diff --git a/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb b/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb
new file mode 100644
index 00000000000..cb5714055bb
--- /dev/null
+++ b/db/post_migrate/20210906130643_drop_temporary_columns_and_triggers_for_taggings.rb
@@ -0,0 +1,18 @@
+# frozen_string_literal: true
+
+class DropTemporaryColumnsAndTriggersForTaggings < Gitlab::Database::Migration[1.0]
+ enable_lock_retries!
+
+ TABLE = 'taggings'
+ COLUMNS = %w(id taggable_id)
+
+ # rubocop:disable Migration/WithLockRetriesDisallowedMethod
+ def up
+ cleanup_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+ # rubocop:enable Migration/WithLockRetriesDisallowedMethod
+
+ def down
+ restore_conversion_of_integer_to_bigint(TABLE, COLUMNS)
+ end
+end