Commit 06c99add authored by Qingyu Zhao's avatar Qingyu Zhao Committed by Adam Hegyi

Validate NOT NULL constraint on gitlab_subscriptions namespace_id

parent dca62fae
---
title: Validate NOT NULL constraint on gitlab_subscriptions namespace_id
merge_request: 57113
author:
type: other
# frozen_string_literal: true
class ValidateNotNullConstraintOnGitlabSubscriptionsNamespaceId < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
validate_not_null_constraint :gitlab_subscriptions, :namespace_id
end
def down
# no-op
end
end
e177c2cc0b59eea54de10417445b391cea7dd308547077aea34054fac22b9e40
\ No newline at end of file
......@@ -13147,7 +13147,8 @@ CREATE TABLE gitlab_subscriptions (
auto_renew boolean,
seats_in_use integer DEFAULT 0 NOT NULL,
seats_owed integer DEFAULT 0 NOT NULL,
trial_extension_type smallint
trial_extension_type smallint,
CONSTRAINT check_77fea3f0e7 CHECK ((namespace_id IS NOT NULL))
);
CREATE SEQUENCE gitlab_subscriptions_id_seq
......@@ -20238,9 +20239,6 @@ ALTER TABLE ONLY chat_teams
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
ALTER TABLE gitlab_subscriptions
ADD CONSTRAINT check_77fea3f0e7 CHECK ((namespace_id IS NOT NULL)) NOT VALID;
ALTER TABLE sprints
ADD CONSTRAINT check_ccd8a1eae0 CHECK ((start_date IS NOT NULL)) NOT VALID;
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