diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 09:09:34 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-04-14 09:09:34 +0000 |
commit | 97f0ae7454597105a27df65ffb772949d9d4f3cb (patch) | |
tree | 0bf4888e0e9082c8f168a211390a73a6ae810cef /db/migrate | |
parent | 5ebc4d92cd5fbb46c627eb04d500384893dbe2b4 (diff) | |
download | gitlab-ce-97f0ae7454597105a27df65ffb772949d9d4f3cb.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb b/db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb new file mode 100644 index 00000000000..70df38aea17 --- /dev/null +++ b/db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb @@ -0,0 +1,17 @@ +# frozen_string_literal: true + +class AddIndexOnCreatorIdCreatedAtIdToProjectsTable < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :projects, [:creator_id, :created_at, :id] + end + + def down + remove_concurrent_index :projects, [:creator_id, :created_at, :id] + end +end |