Merge main, now with the room and creation time index from #295

Both migrations stay; db/schema.rb keeps both indexes and the later version.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_0142qgjggdJ2KDdGk7RF9Xm9
This commit is contained in:
Marcello Costagliola
2026-10-05 15:57:15 +02:00
3 changed files with 14 additions and 8 deletions
@@ -0,0 +1,5 @@
class AddRoomIdAndCreatedAtIndexToMessages < ActiveRecord::Migration[8.2]
def change
add_index :messages, %i[ room_id created_at ]
end
end
Generated
+1
View File
@@ -101,6 +101,7 @@ ActiveRecord::Schema[8.2].define(version: 2026_10_05_022000) do
t.integer "room_id", null: false
t.datetime "updated_at", null: false
t.index ["creator_id"], name: "index_messages_on_creator_id"
t.index ["room_id", "created_at"], name: "index_messages_on_room_id_and_created_at"
t.index ["room_id", "updated_at"], name: "index_messages_on_room_id_and_updated_at"
t.index ["room_id"], name: "index_messages_on_room_id"
end