mirror of
https://github.com/basecamp/once-campfire.git
synced 2026-10-07 07:10:10 +09:00
Merge pull request #295 from namespaceMarcello/messages-room-created-at-index
Index messages by room and creation time
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class AddRoomIdAndCreatedAtIndexToMessages < ActiveRecord::Migration[8.2]
|
||||
def change
|
||||
add_index :messages, %i[ room_id created_at ]
|
||||
end
|
||||
end
|
||||
Generated
+2
-1
@@ -10,7 +10,7 @@
|
||||
#
|
||||
# It's strongly recommended that you check this file into your version control system.
|
||||
|
||||
ActiveRecord::Schema[8.2].define(version: 2025_12_12_154340) do
|
||||
ActiveRecord::Schema[8.2].define(version: 2026_10_04_225000) do
|
||||
create_table "accounts", force: :cascade do |t|
|
||||
t.datetime "created_at", null: false
|
||||
t.text "custom_styles"
|
||||
@@ -101,6 +101,7 @@ ActiveRecord::Schema[8.2].define(version: 2025_12_12_154340) 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"], name: "index_messages_on_room_id"
|
||||
end
|
||||
|
||||
|
||||
Reference in New Issue
Block a user