add index on submission events
This commit is contained in:
@@ -15,6 +15,7 @@
|
|||||||
#
|
#
|
||||||
# Indexes
|
# Indexes
|
||||||
#
|
#
|
||||||
|
# index_submission_events_on_created_at (created_at)
|
||||||
# index_submission_events_on_submission_id (submission_id)
|
# index_submission_events_on_submission_id (submission_id)
|
||||||
# index_submission_events_on_submitter_id (submitter_id)
|
# index_submission_events_on_submitter_id (submitter_id)
|
||||||
#
|
#
|
||||||
|
|||||||
@@ -0,0 +1,7 @@
|
|||||||
|
# frozen_string_literal: true
|
||||||
|
|
||||||
|
class AddIndexOnSubmissionEvents < ActiveRecord::Migration[7.1]
|
||||||
|
def change
|
||||||
|
add_index :submission_events, :created_at
|
||||||
|
end
|
||||||
|
end
|
||||||
+2
-1
@@ -10,7 +10,7 @@
|
|||||||
#
|
#
|
||||||
# It's strongly recommended that you check this file into your version control system.
|
# It's strongly recommended that you check this file into your version control system.
|
||||||
|
|
||||||
ActiveRecord::Schema[7.1].define(version: 2024_02_18_082157) do
|
ActiveRecord::Schema[7.1].define(version: 2024_02_28_074821) do
|
||||||
# These are extensions that must be enabled in order to support this database
|
# These are extensions that must be enabled in order to support this database
|
||||||
enable_extension "plpgsql"
|
enable_extension "plpgsql"
|
||||||
|
|
||||||
@@ -136,6 +136,7 @@ ActiveRecord::Schema[7.1].define(version: 2024_02_18_082157) do
|
|||||||
t.datetime "event_timestamp", null: false
|
t.datetime "event_timestamp", null: false
|
||||||
t.datetime "created_at", null: false
|
t.datetime "created_at", null: false
|
||||||
t.datetime "updated_at", null: false
|
t.datetime "updated_at", null: false
|
||||||
|
t.index ["created_at"], name: "index_submission_events_on_created_at"
|
||||||
t.index ["submission_id"], name: "index_submission_events_on_submission_id"
|
t.index ["submission_id"], name: "index_submission_events_on_submission_id"
|
||||||
t.index ["submitter_id"], name: "index_submission_events_on_submitter_id"
|
t.index ["submitter_id"], name: "index_submission_events_on_submitter_id"
|
||||||
end
|
end
|
||||||
|
|||||||
Reference in New Issue
Block a user