diff options
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.rb | 18 |
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 |