diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-14 03:09:32 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2023-07-14 03:09:32 +0300 |
commit | 804348d39bc1815441c6c4d901a2cf32d5136f9a (patch) | |
tree | a3ec6279260b84faa6561dfc21dc411a2834387d /db | |
parent | 75f2fd2ba85fea64ee1a42f704c4872282f55eb5 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/post_migrate/20230713020247_change_pm_advisories_urls_constraint.rb | 17 | ||||
-rw-r--r-- | db/schema_migrations/20230713020247 | 1 | ||||
-rw-r--r-- | db/structure.sql | 2 |
3 files changed, 19 insertions, 1 deletions
diff --git a/db/post_migrate/20230713020247_change_pm_advisories_urls_constraint.rb b/db/post_migrate/20230713020247_change_pm_advisories_urls_constraint.rb new file mode 100644 index 00000000000..4611f657d0d --- /dev/null +++ b/db/post_migrate/20230713020247_change_pm_advisories_urls_constraint.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class ChangePmAdvisoriesUrlsConstraint < Gitlab::Database::Migration[2.1] + disable_ddl_transaction! + + CONSTRAINT_NAME = "chk_rails_e73af9de76" + + def up + remove_check_constraint :pm_advisories, CONSTRAINT_NAME + add_check_constraint :pm_advisories, "CARDINALITY(urls) <= 20", CONSTRAINT_NAME + end + + def down + remove_check_constraint :pm_advisories, CONSTRAINT_NAME + add_check_constraint :pm_advisories, "CARDINALITY(urls) <= 10", CONSTRAINT_NAME + end +end diff --git a/db/schema_migrations/20230713020247 b/db/schema_migrations/20230713020247 new file mode 100644 index 00000000000..a11206d6e55 --- /dev/null +++ b/db/schema_migrations/20230713020247 @@ -0,0 +1 @@ +8fcab29ea25760d876c2b985cf9e4f2a62e25450322a92fe769533b0882b5402
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 633b2943d1a..340b8fdec79 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -20285,7 +20285,7 @@ CREATE TABLE pm_advisories ( CONSTRAINT check_bed97fa77a CHECK ((char_length(cvss_v3) <= 128)), CONSTRAINT check_e4bfd3ffbf CHECK ((char_length(title) <= 256)), CONSTRAINT check_fee880f7aa CHECK ((char_length(description) <= 8192)), - CONSTRAINT chk_rails_e73af9de76 CHECK ((cardinality(urls) <= 10)) + CONSTRAINT chk_rails_e73af9de76 CHECK ((cardinality(urls) <= 20)) ); CREATE SEQUENCE pm_advisories_id_seq |