Commit 475b90ae authored by Arturo Herrero's avatar Arturo Herrero

Add index services on template

This migration is a corrective action to add the missing
index_services_on_template index on staging.

We suspect the column rename was executed in staging already before it
was rolled back/reverted with 8d4d9705. The rollback doesn't know about
the existence of the index though and hence it is now missing.
parent c14c5af3
# 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
......@@ -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"
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment