diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-04 00:07:52 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-04 00:07:52 +0000 |
commit | 4fe93274dec62ff7361a67be88e320131d66b788 (patch) | |
tree | 98ae79e3101ffd6569fc48bb4c7ad8808540ceb8 /db | |
parent | bbaf2bb0438b1c71020d9d216feb528add225a7f (diff) | |
download | gitlab-ce-4fe93274dec62ff7361a67be88e320131d66b788.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
3 files changed, 37 insertions, 0 deletions
diff --git a/db/migrate/20200102140148_add_expanded_environment_name_to_ci_build_metadata.rb b/db/migrate/20200102140148_add_expanded_environment_name_to_ci_build_metadata.rb new file mode 100644 index 00000000000..e76806c5d3f --- /dev/null +++ b/db/migrate/20200102140148_add_expanded_environment_name_to_ci_build_metadata.rb @@ -0,0 +1,13 @@ +# frozen_string_literal: true + +class AddExpandedEnvironmentNameToCiBuildMetadata < ActiveRecord::Migration[5.2] + DOWNTIME = false + + def up + add_column :ci_builds_metadata, :expanded_environment_name, :string, limit: 255 + end + + def down + remove_column :ci_builds_metadata, :expanded_environment_name + end +end diff --git a/db/migrate/20200225111018_add_index_for_group_and_iid_search_to_epics.rb b/db/migrate/20200225111018_add_index_for_group_and_iid_search_to_epics.rb new file mode 100644 index 00000000000..98f35d9f1ae --- /dev/null +++ b/db/migrate/20200225111018_add_index_for_group_and_iid_search_to_epics.rb @@ -0,0 +1,22 @@ +# frozen_string_literal: true + +class AddIndexForGroupAndIidSearchToEpics < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + INDEX_NAME = 'index_epics_on_group_id_and_iid_varchar_pattern' + + disable_ddl_transaction! + + def up + disable_statement_timeout do + execute "CREATE INDEX CONCURRENTLY \"#{INDEX_NAME}\" ON epics (group_id, CAST(iid AS VARCHAR) varchar_pattern_ops);" + end + end + + def down + disable_statement_timeout do + remove_concurrent_index_by_name :epics, INDEX_NAME + end + end +end diff --git a/db/schema.rb b/db/schema.rb index 355b36e1483..188062b8897 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -722,6 +722,7 @@ ActiveRecord::Schema.define(version: 2020_02_27_165129) do t.jsonb "config_variables" t.boolean "has_exposed_artifacts" t.string "environment_auto_stop_in", limit: 255 + t.string "expanded_environment_name", limit: 255 t.index ["build_id"], name: "index_ci_builds_metadata_on_build_id", unique: true t.index ["build_id"], name: "index_ci_builds_metadata_on_build_id_and_has_exposed_artifacts", where: "(has_exposed_artifacts IS TRUE)" t.index ["build_id"], name: "index_ci_builds_metadata_on_build_id_and_interruptible", where: "(interruptible = true)" @@ -1581,6 +1582,7 @@ ActiveRecord::Schema.define(version: 2020_02_27_165129) do t.integer "start_date_sourcing_epic_id" t.integer "due_date_sourcing_epic_id" t.integer "health_status", limit: 2 + t.index "group_id, ((iid)::character varying) varchar_pattern_ops", name: "index_epics_on_group_id_and_iid_varchar_pattern" t.index ["assignee_id"], name: "index_epics_on_assignee_id" t.index ["author_id"], name: "index_epics_on_author_id" t.index ["closed_by_id"], name: "index_epics_on_closed_by_id" |