diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 13:34:23 -0600 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /db/migrate/20201221124036_add_devops_snapshot_index.rb | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) | |
download | gitlab-ce-6438df3a1e0fb944485cebf07976160184697d72.tar.gz |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'db/migrate/20201221124036_add_devops_snapshot_index.rb')
-rw-r--r-- | db/migrate/20201221124036_add_devops_snapshot_index.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20201221124036_add_devops_snapshot_index.rb b/db/migrate/20201221124036_add_devops_snapshot_index.rb new file mode 100644 index 00000000000..85001e9abcf --- /dev/null +++ b/db/migrate/20201221124036_add_devops_snapshot_index.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddDevopsSnapshotIndex < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + INDEX_NAME = 'index_on_snapshots_segment_id_end_time' + + def up + add_concurrent_index :analytics_devops_adoption_snapshots, [:segment_id, :end_time], name: INDEX_NAME + end + + def down + remove_concurrent_index_by_name :analytics_devops_adoption_snapshots, INDEX_NAME + end +end |