diff options
Diffstat (limited to 'db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb')
-rw-r--r-- | db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb b/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb new file mode 100644 index 00000000000..19f6732d297 --- /dev/null +++ b/db/post_migrate/20221103073328_change_member_namespace_id_not_null.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true + +# See https://docs.gitlab.com/ee/development/migration_style_guide.html +# for more information on how to write migrations for GitLab. + +class ChangeMemberNamespaceIdNotNull < Gitlab::Database::Migration[2.0] + disable_ddl_transaction! + + def up + add_not_null_constraint :members, :member_namespace_id, validate: false + end + + def down + remove_not_null_constraint :members, :member_namespace_id + end +end |