Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
path: root/db
diff options
context:
space:
mode:
authorGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 03:19:10 +0300
committerGitLab Bot <gitlab-bot@gitlab.com>2022-02-18 03:19:10 +0300
commit51d1545877fb481aa14498a18b004867f28d7cce (patch)
tree95a41baab9f88cd5e5d0ccf8da94c87f9885a9b6 /db
parent0c8b3354d966bf689a11736b80460fa5806b4495 (diff)
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r--db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb13
-rw-r--r--db/schema_migrations/202202171352291
-rw-r--r--db/structure.sql4
3 files changed, 15 insertions, 3 deletions
diff --git a/db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb b/db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb
new file mode 100644
index 00000000000..9cc04cef757
--- /dev/null
+++ b/db/post_migrate/20220217135229_validate_not_null_constraint_on_security_findings_uuid.rb
@@ -0,0 +1,13 @@
+# 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
diff --git a/db/schema_migrations/20220217135229 b/db/schema_migrations/20220217135229
new file mode 100644
index 00000000000..fb80b77347f
--- /dev/null
+++ b/db/schema_migrations/20220217135229
@@ -0,0 +1 @@
+3223f741799216ee6afb4daafbcebfa09bd722d461dd4d64fcbda7d8700ae235 \ No newline at end of file
diff --git a/db/structure.sql b/db/structure.sql
index aef55d04486..998117d421f 100644
--- a/db/structure.sql
+++ b/db/structure.sql
@@ -19591,6 +19591,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))
);
@@ -23110,9 +23111,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;