Index events con summary + action
This commit is contained in:
@@ -1,5 +1,8 @@
|
||||
class AddSummaryReferenceToEvents < ActiveRecord::Migration[8.0]
|
||||
def change
|
||||
add_reference :events, :summary, foreign_key: { to_table: :event_summaries }
|
||||
add_reference :events, :summary, foreign_key: { to_table: :event_summaries }, index: false
|
||||
remove_index :events, %i[ bubble_id action ]
|
||||
add_index :events, :bubble_id
|
||||
add_index :events, %i[ summary_id action ]
|
||||
end
|
||||
end
|
||||
|
||||
Generated
+2
-2
@@ -123,9 +123,9 @@ ActiveRecord::Schema[8.0].define(version: 2024_10_22_180133) do
|
||||
t.datetime "created_at", null: false
|
||||
t.datetime "updated_at", null: false
|
||||
t.integer "summary_id"
|
||||
t.index ["bubble_id", "action"], name: "index_events_on_bubble_id_and_action"
|
||||
t.index ["bubble_id"], name: "index_events_on_bubble_id"
|
||||
t.index ["creator_id"], name: "index_events_on_creator_id"
|
||||
t.index ["summary_id"], name: "index_events_on_summary_id"
|
||||
t.index ["summary_id", "action"], name: "index_events_on_summary_id_and_action"
|
||||
end
|
||||
|
||||
create_table "messages", force: :cascade do |t|
|
||||
|
||||
Reference in New Issue
Block a user