diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 09:08:16 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-31 09:08:16 +0000 |
commit | 6044caed20964a70c1ac6c5a3365d567ed96dfde (patch) | |
tree | 3fe8f14b4acbd542265544843efeb6f59b5d3efe /db | |
parent | 92077e0f8d70c70a908395808b16f98ecd3a5fcd (diff) | |
download | gitlab-ce-6044caed20964a70c1ac6c5a3365d567ed96dfde.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
3 files changed, 44 insertions, 1 deletions
diff --git a/db/migrate/20200324093258_add_index_on_id_creator_id_and_created_at_to_projects_table.rb b/db/migrate/20200324093258_add_index_on_id_creator_id_and_created_at_to_projects_table.rb new file mode 100644 index 00000000000..6c4d59af5d6 --- /dev/null +++ b/db/migrate/20200324093258_add_index_on_id_creator_id_and_created_at_to_projects_table.rb @@ -0,0 +1,18 @@ +# frozen_string_literal: true + +class AddIndexOnIdCreatorIdAndCreatedAtToProjectsTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_service_desk_enabled_projects_on_id_creator_id_created_at' + + disable_ddl_transaction! + + def up + add_concurrent_index :projects, [:id, :creator_id, :created_at], where: '"projects"."service_desk_enabled" = TRUE', name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :projects, INDEX_NAME + end +end diff --git a/db/migrate/20200325152327_add_seat_link_enabled_to_application_settings.rb b/db/migrate/20200325152327_add_seat_link_enabled_to_application_settings.rb new file mode 100644 index 00000000000..52f579c175c --- /dev/null +++ b/db/migrate/20200325152327_add_seat_link_enabled_to_application_settings.rb @@ -0,0 +1,20 @@ +# frozen_string_literal: true + +class AddSeatLinkEnabledToApplicationSettings < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_column_with_default(:application_settings, :seat_link_enabled, + :boolean, + default: true, + allow_null: false) + end + + def down + remove_column(:application_settings, :seat_link_enabled) + end +end diff --git a/db/structure.sql b/db/structure.sql index 505050397da..6c807ccc5df 100644 --- a/db/structure.sql +++ b/db/structure.sql @@ -396,7 +396,8 @@ CREATE TABLE public.application_settings ( email_restrictions_enabled boolean DEFAULT false NOT NULL, email_restrictions text, npm_package_requests_forwarding boolean DEFAULT true NOT NULL, - namespace_storage_size_limit bigint DEFAULT 0 NOT NULL + namespace_storage_size_limit bigint DEFAULT 0 NOT NULL, + seat_link_enabled boolean DEFAULT true NOT NULL ); CREATE SEQUENCE public.application_settings_id_seq @@ -9924,6 +9925,8 @@ CREATE INDEX index_serverless_domain_cluster_on_creator_id ON public.serverless_ CREATE INDEX index_serverless_domain_cluster_on_pages_domain_id ON public.serverless_domain_cluster USING btree (pages_domain_id); +CREATE INDEX index_service_desk_enabled_projects_on_id_creator_id_created_at ON public.projects USING btree (id, creator_id, created_at) WHERE (service_desk_enabled = true); + CREATE INDEX index_services_on_project_id_and_type ON public.services USING btree (project_id, type); CREATE INDEX index_services_on_template ON public.services USING btree (template); @@ -12846,7 +12849,9 @@ COPY "schema_migrations" (version) FROM STDIN; 20200323080714 20200323122201 20200323134519 +20200324093258 20200324115359 +20200325152327 20200325160952 20200325183636 \. |