]> git.openstreetmap.org Git - rails.git/blobdiff - db/migrate/20201006213836_add_author_index_to_changeset_comments.rb
Index changeset comments by author and date
[rails.git] / db / migrate / 20201006213836_add_author_index_to_changeset_comments.rb
diff --git a/db/migrate/20201006213836_add_author_index_to_changeset_comments.rb b/db/migrate/20201006213836_add_author_index_to_changeset_comments.rb
new file mode 100644 (file)
index 0000000..fd2af33
--- /dev/null
@@ -0,0 +1,7 @@
+class AddAuthorIndexToChangesetComments < ActiveRecord::Migration[6.0]
+  disable_ddl_transaction!
+
+  def change
+    add_index :changeset_comments, [:author_id, :created_at], :algorithm => :concurrently
+  end
+end