diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-29 03:10:57 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2022-07-29 03:10:57 +0300 |
commit | e064cd3f07fbc239fb46106a1eaf71379ea01603 (patch) | |
tree | eb1f478d6f6d5e73bc50639f7af7a99b4d34a392 /db | |
parent | 9037472904908109f5622a8a1e808c6225eced56 (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
5 files changed, 33 insertions, 1 deletions
diff --git a/db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb b/db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb new file mode 100644 index 00000000000..49d9a652472 --- /dev/null +++ b/db/migrate/20220718083945_add_unique_project_download_limit_allowlist_to_namespace_settings.rb @@ -0,0 +1,11 @@ +# frozen_string_literal: true + +class AddUniqueProjectDownloadLimitAllowlistToNamespaceSettings < Gitlab::Database::Migration[2.0] + def change + add_column :namespace_settings, :unique_project_download_limit_allowlist, + :text, + array: true, + default: [], + null: false + end +end diff --git a/db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb b/db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb new file mode 100644 index 00000000000..bded83f7941 --- /dev/null +++ b/db/migrate/20220726025516_add_namespace_settings_unique_project_download_limit_allowlist_size_constraint.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddNamespaceSettingsUniqueProjectDownloadLimitAllowlistSizeConstraint < Gitlab::Database::Migration[2.0] + CONSTRAINT_NAME = 'namespace_settings_unique_project_download_limit_allowlist_size' + + disable_ddl_transaction! + + def up + add_check_constraint :namespace_settings, + 'CARDINALITY(unique_project_download_limit_allowlist) <= 100', + CONSTRAINT_NAME + end + + def down + remove_check_constraint :namespace_settings, CONSTRAINT_NAME + end +end diff --git a/db/schema_migrations/20220718083945 b/db/schema_migrations/20220718083945 new file mode 100644 index 00000000000..f1d247e5349 --- /dev/null +++ b/db/schema_migrations/20220718083945 @@ -0,0 +1 @@ +42b601de66244f527b8c40182b7c9c8ba3a6ea9863582be3c499ffe2491c8d4f
\ No newline at end of file diff --git a/db/schema_migrations/20220726025516 b/db/schema_migrations/20220726025516 new file mode 100644 index 00000000000..58bab5467db --- /dev/null +++ b/db/schema_migrations/20220726025516 @@ -0,0 +1 @@ +326acd1c7e562056d29d5727869a0d0e5a5e9c387b0f54238c79c89f3947808b
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index 301b5b50871..ff56ae202e8 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -17613,7 +17613,9 @@ CREATE TABLE namespace_settings ( unique_project_download_limit_interval_in_seconds integer DEFAULT 0 NOT NULL, project_import_level smallint DEFAULT 50 NOT NULL, include_for_free_user_cap_preview boolean DEFAULT false NOT NULL, - CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)) + unique_project_download_limit_allowlist text[] DEFAULT '{}'::text[] NOT NULL, + CONSTRAINT check_0ba93c78c7 CHECK ((char_length(default_branch_name) <= 255)), + CONSTRAINT namespace_settings_unique_project_download_limit_allowlist_size CHECK ((cardinality(unique_project_download_limit_allowlist) <= 100)) ); CREATE TABLE namespace_statistics ( |