diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-07 00:08:25 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2020-03-07 00:08:25 +0000 |
commit | 3e31cffa203fd718381421e8035f7161a9f0338e (patch) | |
tree | 5d37928bebf08ddc931efe04a85d66217c8a0cea /db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb | |
parent | 1c25ac983cd1e4335faa1ec4922c314d6321e224 (diff) | |
download | gitlab-ce-3e31cffa203fd718381421e8035f7161a9f0338e.tar.gz |
Add latest changes from gitlab-org/gitlab@master
Diffstat (limited to 'db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb')
-rw-r--r-- | db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb b/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb new file mode 100644 index 00000000000..d0d31ca7c52 --- /dev/null +++ b/db/migrate/20200306170531_add_index_on_author_id_and_created_at_to_todos.rb @@ -0,0 +1,16 @@ +# frozen_string_literal: true +class AddIndexOnAuthorIdAndCreatedAtToTodos < ActiveRecord::Migration[6.0] + include Gitlab::Database::MigrationHelpers + + DOWNTIME = false + + disable_ddl_transaction! + + def up + add_concurrent_index :todos, [:author_id, :created_at] + end + + def down + remove_concurrent_index :todos, [:author_id, :created_at] + end +end |