Commit 281d559a authored by Andreas Brandl's avatar Andreas Brandl

Merge branch 'ab/fix-not-null-inconsistency' into 'master'

Fix not-null inconsistency

See merge request gitlab-org/gitlab!31930
parents bd732f92 0c90737b
---
title: Fix database schema inconsistency with not-null checks
merge_request: 31930
author:
type: other
# frozen_string_literal: true
class FixNotNullCheckConstraintInconsistency < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
def up
table = :application_settings
%i(container_registry_vendor container_registry_version).each do |column|
change_column_null table, column, false
remove_not_null_constraint(table, column) if check_not_null_constraint_exists?(table, column)
end
end
def down
# No-op: for regular systems without the inconsistency, #up is a no-op, too
end
end
......@@ -13817,6 +13817,7 @@ COPY "schema_migrations" (version) FROM STDIN;
20200511162115
20200512085150
20200512164334
20200513160930
20200513234502
20200513235347
20200513235532
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment