Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
06c99add
Commit
06c99add
authored
Mar 29, 2021
by
Qingyu Zhao
Committed by
Adam Hegyi
Mar 29, 2021
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate NOT NULL constraint on gitlab_subscriptions namespace_id
parent
dca62fae
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
25 additions
and
4 deletions
+25
-4
changelogs/unreleased/321662-validate_not_null_constraint_on_gitlab_subscriptions_namespace_id.yml
..._null_constraint_on_gitlab_subscriptions_namespace_id.yml
+5
-0
db/post_migrate/20210322115438_validate_not_null_constraint_on_gitlab_subscriptions_namespace_id.rb
...t_null_constraint_on_gitlab_subscriptions_namespace_id.rb
+17
-0
db/schema_migrations/20210322115438
db/schema_migrations/20210322115438
+1
-0
db/structure.sql
db/structure.sql
+2
-4
No files found.
changelogs/unreleased/321662-validate_not_null_constraint_on_gitlab_subscriptions_namespace_id.yml
0 → 100644
View file @
06c99add
---
title
:
Validate NOT NULL constraint on gitlab_subscriptions namespace_id
merge_request
:
57113
author
:
type
:
other
db/post_migrate/20210322115438_validate_not_null_constraint_on_gitlab_subscriptions_namespace_id.rb
0 → 100644
View file @
06c99add
# 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
db/schema_migrations/20210322115438
0 → 100644
View file @
06c99add
e177c2cc0b59eea54de10417445b391cea7dd308547077aea34054fac22b9e40
\ No newline at end of file
db/structure.sql
View file @
06c99add
...
...
@@ -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;
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment