diff options
Diffstat (limited to 'db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb')
-rw-r--r-- | db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb b/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb new file mode 100644 index 00000000000..85e98d05d02 --- /dev/null +++ b/db/migrate/20200618134223_restore_previous_schema_without_lock_version_null_constraint.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class RestorePreviousSchemaWithoutLockVersionNullConstraint < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + TABLES = %i(epics merge_requests issues ci_stages ci_builds ci_pipelines).freeze + + disable_ddl_transaction! + + def up + TABLES.each do |table| + remove_not_null_constraint table, :lock_version + end + end + + def down + # no-op + end +end |