summaryrefslogtreecommitdiff
path: root/db/migrate
diff options
context:
space:
mode:
Diffstat (limited to 'db/migrate')
-rw-r--r--db/migrate/20200408175424_add_index_on_creator_id_created_at_id_to_projects_table.rb17
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