1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26
table! { test_sessions (id) { id -> Unsigned<Bigint>, test_id -> Unsigned<Bigint>, name -> Varchar, max_registrations -> Nullable<Unsigned<Integer>>, registrations_enabled -> Bool, opening_enabled -> Bool, submissions_enabled -> Bool, } } table! { test_session_registrations (id) { id -> Unsigned<Bigint>, test_session_id -> Unsigned<Bigint>, taker_id -> Unsigned<Bigint>, registered -> Timestamp, opened_test -> Nullable<Timestamp>, submitted_test -> Nullable<Timestamp>, score -> Nullable<Float>, } } joinable!(test_session_registrations -> test_sessions (test_session_id)); allow_tables_to_appear_in_same_query!(test_sessions, test_session_registrations);