diff options
Diffstat (limited to 'db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb')
-rw-r--r-- | db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb b/db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb deleted file mode 100644 index 8279def779e..00000000000 --- a/db/post_migrate/20230119123257_add_fk_to_ci_resources_on_partition_id_and_build_id.rb +++ /dev/null @@ -1,32 +0,0 @@ -# frozen_string_literal: true - -class AddFkToCiResourcesOnPartitionIdAndBuildId < Gitlab::Database::Migration[2.1] - disable_ddl_transaction! - - SOURCE_TABLE_NAME = :ci_resources - TARGET_TABLE_NAME = :ci_builds - COLUMN = :build_id - TARGET_COLUMN = :id - FK_NAME = :fk_e169a8e3d5_p - PARTITION_COLUMN = :partition_id - - def up - add_concurrent_foreign_key( - SOURCE_TABLE_NAME, - TARGET_TABLE_NAME, - column: [PARTITION_COLUMN, COLUMN], - target_column: [PARTITION_COLUMN, TARGET_COLUMN], - validate: false, - reverse_lock_order: true, - on_update: :cascade, - on_delete: :nullify, - name: FK_NAME - ) - end - - def down - with_lock_retries do - remove_foreign_key_if_exists(SOURCE_TABLE_NAME, name: FK_NAME) - end - end -end |