diff options
Diffstat (limited to 'db/migrate/20200406165950_add_not_null_constraint_on_file_store_to_lfs_objects.rb')
-rw-r--r-- | db/migrate/20200406165950_add_not_null_constraint_on_file_store_to_lfs_objects.rb | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/db/migrate/20200406165950_add_not_null_constraint_on_file_store_to_lfs_objects.rb b/db/migrate/20200406165950_add_not_null_constraint_on_file_store_to_lfs_objects.rb deleted file mode 100644 index 78b5832fea4..00000000000 --- a/db/migrate/20200406165950_add_not_null_constraint_on_file_store_to_lfs_objects.rb +++ /dev/null @@ -1,24 +0,0 @@ -# frozen_string_literal: true - -class AddNotNullConstraintOnFileStoreToLfsObjects < ActiveRecord::Migration[6.0] - include Gitlab::Database::MigrationHelpers - - CONSTRAINT_NAME = 'lfs_objects_file_store_not_null' - DOWNTIME = false - - def up - with_lock_retries do - execute <<~SQL - ALTER TABLE lfs_objects ADD CONSTRAINT #{CONSTRAINT_NAME} CHECK (file_store IS NOT NULL) NOT VALID; - SQL - end - end - - def down - with_lock_retries do - execute <<~SQL - ALTER TABLE lfs_objects DROP CONSTRAINT IF EXISTS #{CONSTRAINT_NAME}; - SQL - end - end -end |