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
e0e96868
Commit
e0e96868
authored
Feb 17, 2022
by
Michał Zając
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Validate NOT NULL on security_findings.uuid column
Changelog: changed
parent
58d5d171
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
15 additions
and
3 deletions
+15
-3
db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb
...validate_not_null_constraint_on_security_findings_uuid.rb
+13
-0
db/schema_migrations/20220217135229
db/schema_migrations/20220217135229
+1
-0
db/structure.sql
db/structure.sql
+1
-3
No files found.
db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb
0 → 100644
View file @
e0e96868
# frozen_string_literal: true
class
ValidateNotNullConstraintOnSecurityFindingsUuid
<
Gitlab
::
Database
::
Migration
[
1.0
]
disable_ddl_transaction!
def
up
validate_not_null_constraint
(
:security_findings
,
:uuid
)
end
def
down
# no-op
end
end
db/schema_migrations/20220217135229
0 → 100644
View file @
e0e96868
3223f741799216ee6afb4daafbcebfa09bd722d461dd4d64fcbda7d8700ae235
\ No newline at end of file
db/structure.sql
View file @
e0e96868
...
...
@@ -19592,6 +19592,7 @@ CREATE TABLE security_findings (
deduplicated boolean DEFAULT false NOT NULL,
uuid uuid,
overridden_uuid uuid,
CONSTRAINT check_6c2851a8c9 CHECK ((uuid IS NOT NULL)),
CONSTRAINT check_b9508c6df8 CHECK ((char_length(project_fingerprint) <= 40))
);
...
...
@@ -23111,9 +23112,6 @@ ALTER TABLE ONLY chat_teams
ALTER TABLE vulnerability_scanners
ADD CONSTRAINT check_37608c9db5 CHECK ((char_length(vendor) <= 255)) NOT VALID;
ALTER TABLE security_findings
ADD CONSTRAINT check_6c2851a8c9 CHECK ((uuid 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