diff options
Diffstat (limited to 'db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb')
-rw-r--r-- | db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb b/db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb deleted file mode 100644 index 37a761507fc..00000000000 --- a/db/post_migrate/20200511220023_validate_projects_foreign_key_to_namespaces.rb +++ /dev/null @@ -1,21 +0,0 @@ -# frozen_string_literal: true - -class ValidateProjectsForeignKeyToNamespaces < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - DOWNTIME = false - FK_NAME = 'fk_projects_namespace_id' - - def up - # Validate the FK added with 20200511080113_add_projects_foreign_key_to_namespaces.rb - validate_foreign_key :projects, :namespace_id, name: FK_NAME - end - - def down - # no-op: No need to invalidate the foreign key - # The inconsistent data are permanently fixed with the data migration - # `20200511083541_cleanup_projects_with_missing_namespace.rb` - # even if it is rolled back. - # If there is an issue with the FK, we'll roll back the migration that adds the FK - end -end |