Add index to student_races table

pull/1/head
rebuilt 3 years ago
parent 3fcab58557
commit ead59d0f48

@ -0,0 +1,5 @@
class AddIndexToStudentRaces < ActiveRecord::Migration[7.0]
def change
add_index :student_races, %i[student_id race_id]
end
end

@ -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.0].define(version: 2022_08_09_213959) do ActiveRecord::Schema[7.0].define(version: 2022_08_22_214951) 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 "pg_stat_statements" enable_extension "pg_stat_statements"
enable_extension "plpgsql" enable_extension "plpgsql"
@ -371,6 +371,7 @@ ActiveRecord::Schema[7.0].define(version: 2022_08_09_213959) do
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 ["race_id"], name: "index_student_races_on_race_id" t.index ["race_id"], name: "index_student_races_on_race_id"
t.index ["student_id", "race_id"], name: "index_student_races_on_student_id_and_race_id"
t.index ["student_id"], name: "index_student_races_on_student_id" t.index ["student_id"], name: "index_student_races_on_student_id"
end end

Loading…
Cancel
Save