diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-09 18:07:59 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-09 18:07:59 +0000 |
commit | 7ebcead8cfd2edb810dd0cbda816b6cfbd170fe3 (patch) | |
tree | 11880c4059c89149cf997e9b958fb6d32c7dbdad /db | |
parent | f1a40d0db939dfe8ff95d385e652ff72566be765 (diff) | |
download | gitlab-ce-7ebcead8cfd2edb810dd0cbda816b6cfbd170fe3.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db')
-rw-r--r-- | db/migrate/20200309105539_add_index_services_on_template.rb | 19 | ||||
-rw-r--r-- | db/schema.rb | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/db/migrate/20200309105539_add_index_services_on_template.rb b/db/migrate/20200309105539_add_index_services_on_template.rb new file mode 100644 index 00000000000..731fa04123c --- /dev/null +++ b/db/migrate/20200309105539_add_index_services_on_template.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddIndexServicesOnTemplate < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + # This migration is a corrective action to add the missing + # index_services_on_template index on staging. + def up + add_concurrent_index(:services, :template) unless index_exists?(:services, :template) + end + + def down + # No reverse action as this is a corrective migration. + end +end diff --git a/db/schema.rb b/db/schema.rb index b49c68458ca..deca4b3a6d0 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 2020_03_06_170531) do +ActiveRecord::Schema.define(version: 2020_03_09_105539) do # These are extensions that must be enabled in order to support this database enable_extension "pg_trgm" |