diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 18:09:35 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-04-21 18:09:35 +0300 |
commit | 9c6578ed4e0bc92cd838ef96d978df54403e9609 (patch) | |
tree | 5dff7ad20ae6402e4b7a5a44fe4e81ef04855cdf /db | |
parent | 2af44d609eb8a1579169f9a350bc531d1081d77f (diff) |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
7 files changed, 61 insertions, 4 deletions
diff --git a/db/migrate/20210317123054_add_throttle_package_registry_columns.rb b/db/migrate/20210317123054_add_throttle_package_registry_columns.rb new file mode 100644 index 00000000000..0bb731306c0 --- /dev/null +++ b/db/migrate/20210317123054_add_throttle_package_registry_columns.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class AddThrottlePackageRegistryColumns < ActiveRecord::Migration[6.0] + DOWNTIME = false + + def change + add_column :application_settings, :throttle_unauthenticated_packages_api_requests_per_period, :integer, default: 800, null: false + add_column :application_settings, :throttle_unauthenticated_packages_api_period_in_seconds, :integer, default: 15, null: false + add_column :application_settings, :throttle_authenticated_packages_api_requests_per_period, :integer, default: 1000, null: false + add_column :application_settings, :throttle_authenticated_packages_api_period_in_seconds, :integer, default: 15, null: false + add_column :application_settings, :throttle_unauthenticated_packages_api_enabled, :boolean, default: false, null: false + add_column :application_settings, :throttle_authenticated_packages_api_enabled, :boolean, default: false, null: false + end +end diff --git a/db/migrate/20210419090412_remove_debian_group_architectures_distribution_id_index.rb b/db/migrate/20210419090412_remove_debian_group_architectures_distribution_id_index.rb new file mode 100644 index 00000000000..1df56742480 --- /dev/null +++ b/db/migrate/20210419090412_remove_debian_group_architectures_distribution_id_index.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveDebianGroupArchitecturesDistributionIdIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + INDEX_NAME = 'idx_pkgs_deb_grp_architectures_on_distribution_id' + + disable_ddl_transaction! + + def up + remove_concurrent_index :packages_debian_group_architectures, :distribution_id, name: INDEX_NAME + end + + def down + add_concurrent_index :packages_debian_group_architectures, :distribution_id, name: INDEX_NAME + end +end diff --git a/db/migrate/20210419090542_remove_debian_project_architectures_distribution_id_index.rb b/db/migrate/20210419090542_remove_debian_project_architectures_distribution_id_index.rb new file mode 100644 index 00000000000..1f918bd4dec --- /dev/null +++ b/db/migrate/20210419090542_remove_debian_project_architectures_distribution_id_index.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class RemoveDebianProjectArchitecturesDistributionIdIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + INDEX_NAME = 'idx_pkgs_deb_proj_architectures_on_distribution_id' + + disable_ddl_transaction! + + def up + remove_concurrent_index :packages_debian_project_architectures, :distribution_id, name: INDEX_NAME + end + + def down + add_concurrent_index :packages_debian_project_architectures, :distribution_id, name: INDEX_NAME + end +end diff --git a/db/schema_migrations/20210317123054 b/db/schema_migrations/20210317123054 new file mode 100644 index 00000000000..1a18d409ac7 --- /dev/null +++ b/db/schema_migrations/20210317123054 @@ -0,0 +1 @@ +28b1e8add8ac7249be55ccd25e60c8a181d2ff036a7d69ac861bcdb5bf5e84e1
\ No newline at end of file diff --git a/db/schema_migrations/20210419090412 b/db/schema_migrations/20210419090412 new file mode 100644 index 00000000000..de75d4e5cfc --- /dev/null +++ b/db/schema_migrations/20210419090412 @@ -0,0 +1 @@ +da9c3d764a5750a40e0f6edd2e713efd77620ba3e684e48d47c7f855e47b2984
\ No newline at end of file diff --git a/db/schema_migrations/20210419090542 b/db/schema_migrations/20210419090542 new file mode 100644 index 00000000000..a6b265e4d17 --- /dev/null +++ b/db/schema_migrations/20210419090542 @@ -0,0 +1 @@ +7a7b0eaa67851aa9300e4750fd05c6d2d0b49ca7077099a0208a89c74ac03a2c
\ No newline at end of file diff --git a/db/structure.sql b/db/structure.sql index fcc36aafc7e..83394e38a80 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -9445,6 +9445,12 @@ CREATE TABLE application_settings ( encrypted_external_pipeline_validation_service_token text, encrypted_external_pipeline_validation_service_token_iv text, external_pipeline_validation_service_url text, + throttle_unauthenticated_packages_api_requests_per_period integer DEFAULT 800 NOT NULL, + throttle_unauthenticated_packages_api_period_in_seconds integer DEFAULT 15 NOT NULL, + throttle_authenticated_packages_api_requests_per_period integer DEFAULT 1000 NOT NULL, + throttle_authenticated_packages_api_period_in_seconds integer DEFAULT 15 NOT NULL, + throttle_unauthenticated_packages_api_enabled boolean DEFAULT false NOT NULL, + throttle_authenticated_packages_api_enabled boolean DEFAULT false NOT NULL, CONSTRAINT app_settings_container_reg_cleanup_tags_max_list_size_positive CHECK ((container_registry_cleanup_tags_service_max_list_size >= 0)), CONSTRAINT app_settings_ext_pipeline_validation_service_url_text_limit CHECK ((char_length(external_pipeline_validation_service_url) <= 255)), CONSTRAINT app_settings_registry_exp_policies_worker_capacity_positive CHECK ((container_registry_expiration_policies_worker_capacity >= 0)), @@ -21786,10 +21792,6 @@ CREATE INDEX idx_packages_debian_project_component_files_on_architecture_id ON p CREATE INDEX idx_packages_packages_on_project_id_name_version_package_type ON packages_packages USING btree (project_id, name, version, package_type); -CREATE INDEX idx_pkgs_deb_grp_architectures_on_distribution_id ON packages_debian_group_architectures USING btree (distribution_id); - -CREATE INDEX idx_pkgs_deb_proj_architectures_on_distribution_id ON packages_debian_project_architectures USING btree (distribution_id); - CREATE UNIQUE INDEX idx_pkgs_dep_links_on_pkg_id_dependency_id_dependency_type ON packages_dependency_links USING btree (package_id, dependency_id, dependency_type); CREATE INDEX idx_proj_feat_usg_on_jira_dvcs_cloud_last_sync_at_and_proj_id ON project_feature_usages USING btree (jira_dvcs_cloud_last_sync_at, project_id) WHERE (jira_dvcs_cloud_last_sync_at IS NOT NULL); |