Skip to content

Commit

Permalink
Index submission_id on awarded_points
Browse files Browse the repository at this point in the history
  • Loading branch information
nygrenh committed Mar 4, 2024
1 parent 5020570 commit 86536c3
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
class AddSubmissionIdIndexToAwardedPoints < ActiveRecord::Migration[6.1]
def change
add_index :awarded_points, :submission_id
end
end
3 changes: 2 additions & 1 deletion db/schema.rb
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
#
# It's strongly recommended that you check this file into your version control system.

ActiveRecord::Schema.define(version: 2024_02_28_101929) do
ActiveRecord::Schema.define(version: 2024_03_04_085436) do

# These are extensions that must be enabled in order to support this database
enable_extension "plpgsql"
Expand Down Expand Up @@ -77,6 +77,7 @@
t.boolean "awarded_after_soft_deadline", default: false, null: false
t.index ["course_id", "user_id", "name"], name: "index_awarded_points_on_course_id_and_user_id_and_name", unique: true
t.index ["course_id", "user_id", "submission_id"], name: "index_awarded_points_on_course_id_and_user_id_and_submission_id"
t.index ["submission_id"], name: "index_awarded_points_on_submission_id"
t.index ["user_id", "submission_id", "name"], name: "index_awarded_points_on_user_id_and_submission_id_and_name", unique: true
end

Expand Down

0 comments on commit 86536c3

Please sign in to comment.