diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 12:09:22 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-13 12:09:22 +0000 |
commit | 286fe61013674fe2d245ffc8d2233baf09923e70 (patch) | |
tree | 2037291f5863105e54e75be056b49f7d62007cae /db/migrate | |
parent | 4cb5e5011abfe8d50ac3a7ebd0018c563c6d7af4 (diff) | |
download | gitlab-ce-286fe61013674fe2d245ffc8d2233baf09923e70.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate')
-rw-r--r-- | db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb b/db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb new file mode 100644 index 00000000000..8005da5fbae --- /dev/null +++ b/db/migrate/20200310133822_add_index_on_author_id_and_id_and_created_at_to_notes.rb @@ -0,0 +1,19 @@ +# frozen_string_literal: true + +class AddIndexOnAuthorIdAndIdAndCreatedAtToNotes < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :notes, [:author_id, :created_at] + remove_concurrent_index :notes, [:author_id] + end + + def down + add_concurrent_index :notes, [:author_id] + remove_concurrent_index :notes, [:author_id, :created_at] + end +end |