| 1 | { |
| 2 | "_meta": { |
| 3 | "generated_from": "C:/PROJECTS/analiz/hezarfen_backend-main/src/migration_sql.rs (1518 lines, read in full)", |
| 4 | "surrealdb": "3.2 (Cargo.toml:22)", |
| 5 | "school_table_count": 60, |
| 6 | "control_table_count": 4, |
| 7 | "field_count": 409, |
| 8 | "source_paths_are_relative_to": "hezarfen_backend-main/src/", |
| 9 | "notes": [ |
| 10 | "NO DEFINE FIELD in this schema carries a VALUE or an ASSERT clause - verified by grep over migration_sql.rs.", |
| 11 | "All 60 school tables are SCHEMAFULL. rag_output.payload is the only FLEXIBLE object.", |
| 12 | "Fields marked overwrite:true were declared with DEFINE FIELD OVERWRITE (a type change on an existing db).", |
| 13 | "removed_fields / removed_indexes list REMOVE statements - those columns must NOT be written." |
| 14 | ] |
| 15 | }, |
| 16 | "tables": { |
| 17 | "user": { |
| 18 | "schemafull": true, |
| 19 | "source": "migration_sql.rs:49", |
| 20 | "fields": { |
| 21 | "username": { |
| 22 | "type": "string", |
| 23 | "optional": false, |
| 24 | "default": null, |
| 25 | "readonly": false, |
| 26 | "value": null, |
| 27 | "assert": null, |
| 28 | "flexible": false, |
| 29 | "overwrite": false, |
| 30 | "source": "migration_sql.rs:50" |
| 31 | }, |
| 32 | "password_hash": { |
| 33 | "type": "string", |
| 34 | "optional": false, |
| 35 | "default": null, |
| 36 | "readonly": false, |
| 37 | "value": null, |
| 38 | "assert": null, |
| 39 | "flexible": false, |
| 40 | "overwrite": false, |
| 41 | "source": "migration_sql.rs:51" |
| 42 | }, |
| 43 | "role": { |
| 44 | "type": "string", |
| 45 | "optional": false, |
| 46 | "default": "'student'", |
| 47 | "readonly": false, |
| 48 | "value": null, |
| 49 | "assert": null, |
| 50 | "flexible": false, |
| 51 | "overwrite": false, |
| 52 | "source": "migration_sql.rs:52" |
| 53 | }, |
| 54 | "name": { |
| 55 | "type": "option<string>", |
| 56 | "optional": true, |
| 57 | "default": null, |
| 58 | "readonly": false, |
| 59 | "value": null, |
| 60 | "assert": null, |
| 61 | "flexible": false, |
| 62 | "overwrite": false, |
| 63 | "source": "migration_sql.rs:53" |
| 64 | }, |
| 65 | "surname": { |
| 66 | "type": "option<string>", |
| 67 | "optional": true, |
| 68 | "default": null, |
| 69 | "readonly": false, |
| 70 | "value": null, |
| 71 | "assert": null, |
| 72 | "flexible": false, |
| 73 | "overwrite": false, |
| 74 | "source": "migration_sql.rs:54" |
| 75 | }, |
| 76 | "email": { |
| 77 | "type": "option<string>", |
| 78 | "optional": true, |
| 79 | "default": null, |
| 80 | "readonly": false, |
| 81 | "value": null, |
| 82 | "assert": null, |
| 83 | "flexible": false, |
| 84 | "overwrite": false, |
| 85 | "source": "migration_sql.rs:55" |
| 86 | }, |
| 87 | "phone": { |
| 88 | "type": "option<string>", |
| 89 | "optional": true, |
| 90 | "default": null, |
| 91 | "readonly": false, |
| 92 | "value": null, |
| 93 | "assert": null, |
| 94 | "flexible": false, |
| 95 | "overwrite": false, |
| 96 | "source": "migration_sql.rs:56" |
| 97 | }, |
| 98 | "birth_date": { |
| 99 | "type": "option<string>", |
| 100 | "optional": true, |
| 101 | "default": null, |
| 102 | "readonly": false, |
| 103 | "value": null, |
| 104 | "assert": null, |
| 105 | "flexible": false, |
| 106 | "overwrite": false, |
| 107 | "source": "migration_sql.rs:57" |
| 108 | }, |
| 109 | "theme": { |
| 110 | "type": "option<string>", |
| 111 | "optional": true, |
| 112 | "default": null, |
| 113 | "readonly": false, |
| 114 | "value": null, |
| 115 | "assert": null, |
| 116 | "flexible": false, |
| 117 | "overwrite": false, |
| 118 | "source": "migration_sql.rs:58" |
| 119 | }, |
| 120 | "language": { |
| 121 | "type": "option<string>", |
| 122 | "optional": true, |
| 123 | "default": null, |
| 124 | "readonly": false, |
| 125 | "value": null, |
| 126 | "assert": null, |
| 127 | "flexible": false, |
| 128 | "overwrite": false, |
| 129 | "source": "migration_sql.rs:59" |
| 130 | }, |
| 131 | "palette_color": { |
| 132 | "type": "option<string>", |
| 133 | "optional": true, |
| 134 | "default": null, |
| 135 | "readonly": false, |
| 136 | "value": null, |
| 137 | "assert": null, |
| 138 | "flexible": false, |
| 139 | "overwrite": false, |
| 140 | "source": "migration_sql.rs:60" |
| 141 | }, |
| 142 | "display_name": { |
| 143 | "type": "option<string>", |
| 144 | "optional": true, |
| 145 | "default": null, |
| 146 | "readonly": false, |
| 147 | "value": null, |
| 148 | "assert": null, |
| 149 | "flexible": false, |
| 150 | "overwrite": false, |
| 151 | "source": "migration_sql.rs:61" |
| 152 | }, |
| 153 | "bio": { |
| 154 | "type": "option<string>", |
| 155 | "optional": true, |
| 156 | "default": null, |
| 157 | "readonly": false, |
| 158 | "value": null, |
| 159 | "assert": null, |
| 160 | "flexible": false, |
| 161 | "overwrite": false, |
| 162 | "source": "migration_sql.rs:62" |
| 163 | }, |
| 164 | "avatar_file": { |
| 165 | "type": "option<string>", |
| 166 | "optional": true, |
| 167 | "default": null, |
| 168 | "readonly": false, |
| 169 | "value": null, |
| 170 | "assert": null, |
| 171 | "flexible": false, |
| 172 | "overwrite": false, |
| 173 | "source": "migration_sql.rs:63" |
| 174 | }, |
| 175 | "avatar_content_type": { |
| 176 | "type": "option<string>", |
| 177 | "optional": true, |
| 178 | "default": null, |
| 179 | "readonly": false, |
| 180 | "value": null, |
| 181 | "assert": null, |
| 182 | "flexible": false, |
| 183 | "overwrite": false, |
| 184 | "source": "migration_sql.rs:64" |
| 185 | }, |
| 186 | "avatar_size": { |
| 187 | "type": "option<int>", |
| 188 | "optional": true, |
| 189 | "default": null, |
| 190 | "readonly": false, |
| 191 | "value": null, |
| 192 | "assert": null, |
| 193 | "flexible": false, |
| 194 | "overwrite": false, |
| 195 | "source": "migration_sql.rs:65" |
| 196 | }, |
| 197 | "chatbot_thread_count": { |
| 198 | "type": "option<int>", |
| 199 | "optional": true, |
| 200 | "default": null, |
| 201 | "readonly": false, |
| 202 | "value": null, |
| 203 | "assert": null, |
| 204 | "flexible": false, |
| 205 | "overwrite": false, |
| 206 | "source": "migration_sql.rs:66" |
| 207 | }, |
| 208 | "board_count": { |
| 209 | "type": "option<int>", |
| 210 | "optional": true, |
| 211 | "default": null, |
| 212 | "readonly": false, |
| 213 | "value": null, |
| 214 | "assert": null, |
| 215 | "flexible": false, |
| 216 | "overwrite": false, |
| 217 | "source": "migration_sql.rs:67" |
| 218 | }, |
| 219 | "homework_submitted_total": { |
| 220 | "type": "option<int>", |
| 221 | "optional": true, |
| 222 | "default": null, |
| 223 | "readonly": false, |
| 224 | "value": null, |
| 225 | "assert": null, |
| 226 | "flexible": false, |
| 227 | "overwrite": false, |
| 228 | "source": "migration_sql.rs:73" |
| 229 | }, |
| 230 | "homework_on_time_total": { |
| 231 | "type": "option<int>", |
| 232 | "optional": true, |
| 233 | "default": null, |
| 234 | "readonly": false, |
| 235 | "value": null, |
| 236 | "assert": null, |
| 237 | "flexible": false, |
| 238 | "overwrite": false, |
| 239 | "source": "migration_sql.rs:74" |
| 240 | }, |
| 241 | "exam_sat_total": { |
| 242 | "type": "option<int>", |
| 243 | "optional": true, |
| 244 | "default": null, |
| 245 | "readonly": false, |
| 246 | "value": null, |
| 247 | "assert": null, |
| 248 | "flexible": false, |
| 249 | "overwrite": false, |
| 250 | "source": "migration_sql.rs:75" |
| 251 | }, |
| 252 | "pomodoro_finished_total": { |
| 253 | "type": "option<int>", |
| 254 | "optional": true, |
| 255 | "default": null, |
| 256 | "readonly": false, |
| 257 | "value": null, |
| 258 | "assert": null, |
| 259 | "flexible": false, |
| 260 | "overwrite": false, |
| 261 | "source": "migration_sql.rs:76" |
| 262 | }, |
| 263 | "pomodoro_focus_ms_total": { |
| 264 | "type": "option<int>", |
| 265 | "optional": true, |
| 266 | "default": null, |
| 267 | "readonly": false, |
| 268 | "value": null, |
| 269 | "assert": null, |
| 270 | "flexible": false, |
| 271 | "overwrite": false, |
| 272 | "source": "migration_sql.rs:77" |
| 273 | }, |
| 274 | "marks_given_total": { |
| 275 | "type": "option<int>", |
| 276 | "optional": true, |
| 277 | "default": null, |
| 278 | "readonly": false, |
| 279 | "value": null, |
| 280 | "assert": null, |
| 281 | "flexible": false, |
| 282 | "overwrite": false, |
| 283 | "source": "migration_sql.rs:84" |
| 284 | }, |
| 285 | "lessons_held_total": { |
| 286 | "type": "option<int>", |
| 287 | "optional": true, |
| 288 | "default": null, |
| 289 | "readonly": false, |
| 290 | "value": null, |
| 291 | "assert": null, |
| 292 | "flexible": false, |
| 293 | "overwrite": false, |
| 294 | "source": "migration_sql.rs:85" |
| 295 | }, |
| 296 | "pool_approved_total": { |
| 297 | "type": "option<int>", |
| 298 | "optional": true, |
| 299 | "default": null, |
| 300 | "readonly": false, |
| 301 | "value": null, |
| 302 | "assert": null, |
| 303 | "flexible": false, |
| 304 | "overwrite": false, |
| 305 | "source": "migration_sql.rs:86" |
| 306 | }, |
| 307 | "pool_published_total": { |
| 308 | "type": "option<int>", |
| 309 | "optional": true, |
| 310 | "default": null, |
| 311 | "readonly": false, |
| 312 | "value": null, |
| 313 | "assert": null, |
| 314 | "flexible": false, |
| 315 | "overwrite": false, |
| 316 | "source": "migration_sql.rs:87" |
| 317 | }, |
| 318 | "lessons_attended_total": { |
| 319 | "type": "option<int>", |
| 320 | "optional": true, |
| 321 | "default": null, |
| 322 | "readonly": false, |
| 323 | "value": null, |
| 324 | "assert": null, |
| 325 | "flexible": false, |
| 326 | "overwrite": false, |
| 327 | "source": "migration_sql.rs:88" |
| 328 | }, |
| 329 | "high_mark_total": { |
| 330 | "type": "option<int>", |
| 331 | "optional": true, |
| 332 | "default": null, |
| 333 | "readonly": false, |
| 334 | "value": null, |
| 335 | "assert": null, |
| 336 | "flexible": false, |
| 337 | "overwrite": false, |
| 338 | "source": "migration_sql.rs:89" |
| 339 | }, |
| 340 | "study_streak_longest": { |
| 341 | "type": "option<int>", |
| 342 | "optional": true, |
| 343 | "default": null, |
| 344 | "readonly": false, |
| 345 | "value": null, |
| 346 | "assert": null, |
| 347 | "flexible": false, |
| 348 | "overwrite": false, |
| 349 | "source": "migration_sql.rs:90" |
| 350 | }, |
| 351 | "study_streak_current": { |
| 352 | "type": "option<int>", |
| 353 | "optional": true, |
| 354 | "default": null, |
| 355 | "readonly": false, |
| 356 | "value": null, |
| 357 | "assert": null, |
| 358 | "flexible": false, |
| 359 | "overwrite": false, |
| 360 | "source": "migration_sql.rs:91" |
| 361 | }, |
| 362 | "study_streak_last_day": { |
| 363 | "type": "option<int>", |
| 364 | "optional": true, |
| 365 | "default": null, |
| 366 | "readonly": false, |
| 367 | "value": null, |
| 368 | "assert": null, |
| 369 | "flexible": false, |
| 370 | "overwrite": false, |
| 371 | "source": "migration_sql.rs:92" |
| 372 | }, |
| 373 | "pomodoro_counted_day": { |
| 374 | "type": "option<int>", |
| 375 | "optional": true, |
| 376 | "default": null, |
| 377 | "readonly": false, |
| 378 | "value": null, |
| 379 | "assert": null, |
| 380 | "flexible": false, |
| 381 | "overwrite": false, |
| 382 | "source": "migration_sql.rs:98" |
| 383 | }, |
| 384 | "pomodoro_counted_today": { |
| 385 | "type": "option<int>", |
| 386 | "optional": true, |
| 387 | "default": null, |
| 388 | "readonly": false, |
| 389 | "value": null, |
| 390 | "assert": null, |
| 391 | "flexible": false, |
| 392 | "overwrite": false, |
| 393 | "source": "migration_sql.rs:99" |
| 394 | } |
| 395 | }, |
| 396 | "indexes": [ |
| 397 | { |
| 398 | "name": "user_username", |
| 399 | "fields": [ |
| 400 | "username" |
| 401 | ], |
| 402 | "unique": true, |
| 403 | "source": "migration_sql.rs:100" |
| 404 | } |
| 405 | ] |
| 406 | }, |
| 407 | "session": { |
| 408 | "schemafull": true, |
| 409 | "source": "migration_sql.rs:102", |
| 410 | "fields": { |
| 411 | "user": { |
| 412 | "type": "record<user>", |
| 413 | "optional": false, |
| 414 | "default": null, |
| 415 | "readonly": false, |
| 416 | "value": null, |
| 417 | "assert": null, |
| 418 | "flexible": false, |
| 419 | "overwrite": false, |
| 420 | "source": "migration_sql.rs:103" |
| 421 | }, |
| 422 | "token": { |
| 423 | "type": "string", |
| 424 | "optional": false, |
| 425 | "default": null, |
| 426 | "readonly": false, |
| 427 | "value": null, |
| 428 | "assert": null, |
| 429 | "flexible": false, |
| 430 | "overwrite": false, |
| 431 | "source": "migration_sql.rs:104" |
| 432 | }, |
| 433 | "expires_at": { |
| 434 | "type": "int", |
| 435 | "optional": false, |
| 436 | "default": null, |
| 437 | "readonly": false, |
| 438 | "value": null, |
| 439 | "assert": null, |
| 440 | "flexible": false, |
| 441 | "overwrite": false, |
| 442 | "source": "migration_sql.rs:105" |
| 443 | } |
| 444 | }, |
| 445 | "indexes": [ |
| 446 | { |
| 447 | "name": "session_token", |
| 448 | "fields": [ |
| 449 | "token" |
| 450 | ], |
| 451 | "unique": true, |
| 452 | "source": "migration_sql.rs:106" |
| 453 | }, |
| 454 | { |
| 455 | "name": "session_expires", |
| 456 | "fields": [ |
| 457 | "expires_at" |
| 458 | ], |
| 459 | "unique": false, |
| 460 | "source": "migration_sql.rs:107" |
| 461 | } |
| 462 | ] |
| 463 | }, |
| 464 | "note": { |
| 465 | "schemafull": true, |
| 466 | "source": "migration_sql.rs:109", |
| 467 | "fields": { |
| 468 | "user": { |
| 469 | "type": "record<user>", |
| 470 | "optional": false, |
| 471 | "default": null, |
| 472 | "readonly": false, |
| 473 | "value": null, |
| 474 | "assert": null, |
| 475 | "flexible": false, |
| 476 | "overwrite": false, |
| 477 | "source": "migration_sql.rs:110" |
| 478 | }, |
| 479 | "title": { |
| 480 | "type": "string", |
| 481 | "optional": false, |
| 482 | "default": null, |
| 483 | "readonly": false, |
| 484 | "value": null, |
| 485 | "assert": null, |
| 486 | "flexible": false, |
| 487 | "overwrite": false, |
| 488 | "source": "migration_sql.rs:111" |
| 489 | }, |
| 490 | "content": { |
| 491 | "type": "string", |
| 492 | "optional": false, |
| 493 | "default": null, |
| 494 | "readonly": false, |
| 495 | "value": null, |
| 496 | "assert": null, |
| 497 | "flexible": false, |
| 498 | "overwrite": false, |
| 499 | "source": "migration_sql.rs:112" |
| 500 | }, |
| 501 | "file_count": { |
| 502 | "type": "option<int>", |
| 503 | "optional": true, |
| 504 | "default": null, |
| 505 | "readonly": false, |
| 506 | "value": null, |
| 507 | "assert": null, |
| 508 | "flexible": false, |
| 509 | "overwrite": false, |
| 510 | "source": "migration_sql.rs:113" |
| 511 | } |
| 512 | }, |
| 513 | "indexes": [ |
| 514 | { |
| 515 | "name": "note_user", |
| 516 | "fields": [ |
| 517 | "user" |
| 518 | ], |
| 519 | "unique": false, |
| 520 | "source": "migration_sql.rs:114" |
| 521 | } |
| 522 | ] |
| 523 | }, |
| 524 | "message": { |
| 525 | "schemafull": true, |
| 526 | "source": "migration_sql.rs:116", |
| 527 | "fields": { |
| 528 | "sender": { |
| 529 | "type": "record<user>", |
| 530 | "optional": false, |
| 531 | "default": null, |
| 532 | "readonly": false, |
| 533 | "value": null, |
| 534 | "assert": null, |
| 535 | "flexible": false, |
| 536 | "overwrite": false, |
| 537 | "source": "migration_sql.rs:117" |
| 538 | }, |
| 539 | "recipient": { |
| 540 | "type": "record<user>", |
| 541 | "optional": false, |
| 542 | "default": null, |
| 543 | "readonly": false, |
| 544 | "value": null, |
| 545 | "assert": null, |
| 546 | "flexible": false, |
| 547 | "overwrite": false, |
| 548 | "source": "migration_sql.rs:118" |
| 549 | }, |
| 550 | "subject": { |
| 551 | "type": "string", |
| 552 | "optional": false, |
| 553 | "default": null, |
| 554 | "readonly": false, |
| 555 | "value": null, |
| 556 | "assert": null, |
| 557 | "flexible": false, |
| 558 | "overwrite": false, |
| 559 | "source": "migration_sql.rs:119" |
| 560 | }, |
| 561 | "body": { |
| 562 | "type": "string", |
| 563 | "optional": false, |
| 564 | "default": null, |
| 565 | "readonly": false, |
| 566 | "value": null, |
| 567 | "assert": null, |
| 568 | "flexible": false, |
| 569 | "overwrite": false, |
| 570 | "source": "migration_sql.rs:120" |
| 571 | }, |
| 572 | "label": { |
| 573 | "type": "option<string>", |
| 574 | "optional": true, |
| 575 | "default": null, |
| 576 | "readonly": false, |
| 577 | "value": null, |
| 578 | "assert": null, |
| 579 | "flexible": false, |
| 580 | "overwrite": false, |
| 581 | "source": "migration_sql.rs:121" |
| 582 | }, |
| 583 | "sent_at": { |
| 584 | "type": "int", |
| 585 | "optional": false, |
| 586 | "default": null, |
| 587 | "readonly": false, |
| 588 | "value": null, |
| 589 | "assert": null, |
| 590 | "flexible": false, |
| 591 | "overwrite": false, |
| 592 | "source": "migration_sql.rs:122" |
| 593 | }, |
| 594 | "read": { |
| 595 | "type": "bool", |
| 596 | "optional": false, |
| 597 | "default": "false", |
| 598 | "readonly": false, |
| 599 | "value": null, |
| 600 | "assert": null, |
| 601 | "flexible": false, |
| 602 | "overwrite": false, |
| 603 | "source": "migration_sql.rs:123" |
| 604 | }, |
| 605 | "sender_folder": { |
| 606 | "type": "string", |
| 607 | "optional": false, |
| 608 | "default": "'sent'", |
| 609 | "readonly": false, |
| 610 | "value": null, |
| 611 | "assert": null, |
| 612 | "flexible": false, |
| 613 | "overwrite": false, |
| 614 | "source": "migration_sql.rs:124" |
| 615 | }, |
| 616 | "recipient_folder": { |
| 617 | "type": "string", |
| 618 | "optional": false, |
| 619 | "default": "'inbox'", |
| 620 | "readonly": false, |
| 621 | "value": null, |
| 622 | "assert": null, |
| 623 | "flexible": false, |
| 624 | "overwrite": false, |
| 625 | "source": "migration_sql.rs:125" |
| 626 | }, |
| 627 | "sender_origin": { |
| 628 | "type": "option<string>", |
| 629 | "optional": true, |
| 630 | "default": null, |
| 631 | "readonly": false, |
| 632 | "value": null, |
| 633 | "assert": null, |
| 634 | "flexible": false, |
| 635 | "overwrite": false, |
| 636 | "source": "migration_sql.rs:130" |
| 637 | }, |
| 638 | "recipient_origin": { |
| 639 | "type": "option<string>", |
| 640 | "optional": true, |
| 641 | "default": null, |
| 642 | "readonly": false, |
| 643 | "value": null, |
| 644 | "assert": null, |
| 645 | "flexible": false, |
| 646 | "overwrite": false, |
| 647 | "source": "migration_sql.rs:131" |
| 648 | } |
| 649 | }, |
| 650 | "indexes": [ |
| 651 | { |
| 652 | "name": "message_sender", |
| 653 | "fields": [ |
| 654 | "sender" |
| 655 | ], |
| 656 | "unique": false, |
| 657 | "source": "migration_sql.rs:132" |
| 658 | }, |
| 659 | { |
| 660 | "name": "message_recipient", |
| 661 | "fields": [ |
| 662 | "recipient" |
| 663 | ], |
| 664 | "unique": false, |
| 665 | "source": "migration_sql.rs:133" |
| 666 | } |
| 667 | ] |
| 668 | }, |
| 669 | "board": { |
| 670 | "schemafull": true, |
| 671 | "source": "migration_sql.rs:142", |
| 672 | "fields": { |
| 673 | "creator": { |
| 674 | "type": "record<user>", |
| 675 | "optional": false, |
| 676 | "default": null, |
| 677 | "readonly": false, |
| 678 | "value": null, |
| 679 | "assert": null, |
| 680 | "flexible": false, |
| 681 | "overwrite": false, |
| 682 | "source": "migration_sql.rs:143" |
| 683 | }, |
| 684 | "title": { |
| 685 | "type": "string", |
| 686 | "optional": false, |
| 687 | "default": null, |
| 688 | "readonly": false, |
| 689 | "value": null, |
| 690 | "assert": null, |
| 691 | "flexible": false, |
| 692 | "overwrite": false, |
| 693 | "source": "migration_sql.rs:144" |
| 694 | }, |
| 695 | "participants": { |
| 696 | "type": "array<record<user>>", |
| 697 | "optional": false, |
| 698 | "default": null, |
| 699 | "readonly": false, |
| 700 | "value": null, |
| 701 | "assert": null, |
| 702 | "flexible": false, |
| 703 | "overwrite": false, |
| 704 | "source": "migration_sql.rs:145" |
| 705 | }, |
| 706 | "locked": { |
| 707 | "type": "bool", |
| 708 | "optional": false, |
| 709 | "default": "false", |
| 710 | "readonly": false, |
| 711 | "value": null, |
| 712 | "assert": null, |
| 713 | "flexible": false, |
| 714 | "overwrite": false, |
| 715 | "source": "migration_sql.rs:146" |
| 716 | }, |
| 717 | "locked_by": { |
| 718 | "type": "option<record<user>>", |
| 719 | "optional": true, |
| 720 | "default": null, |
| 721 | "readonly": false, |
| 722 | "value": null, |
| 723 | "assert": null, |
| 724 | "flexible": false, |
| 725 | "overwrite": false, |
| 726 | "source": "migration_sql.rs:147" |
| 727 | }, |
| 728 | "locked_at": { |
| 729 | "type": "option<int>", |
| 730 | "optional": true, |
| 731 | "default": null, |
| 732 | "readonly": false, |
| 733 | "value": null, |
| 734 | "assert": null, |
| 735 | "flexible": false, |
| 736 | "overwrite": false, |
| 737 | "source": "migration_sql.rs:148" |
| 738 | }, |
| 739 | "epoch": { |
| 740 | "type": "int", |
| 741 | "optional": false, |
| 742 | "default": "0", |
| 743 | "readonly": false, |
| 744 | "value": null, |
| 745 | "assert": null, |
| 746 | "flexible": false, |
| 747 | "overwrite": false, |
| 748 | "source": "migration_sql.rs:149" |
| 749 | }, |
| 750 | "epoch_stroke_count": { |
| 751 | "type": "option<int>", |
| 752 | "optional": true, |
| 753 | "default": null, |
| 754 | "readonly": false, |
| 755 | "value": null, |
| 756 | "assert": null, |
| 757 | "flexible": false, |
| 758 | "overwrite": false, |
| 759 | "source": "migration_sql.rs:151" |
| 760 | }, |
| 761 | "total_stroke_count": { |
| 762 | "type": "option<int>", |
| 763 | "optional": true, |
| 764 | "default": null, |
| 765 | "readonly": false, |
| 766 | "value": null, |
| 767 | "assert": null, |
| 768 | "flexible": false, |
| 769 | "overwrite": false, |
| 770 | "source": "migration_sql.rs:152" |
| 771 | }, |
| 772 | "closed_at": { |
| 773 | "type": "option<int>", |
| 774 | "optional": true, |
| 775 | "default": null, |
| 776 | "readonly": false, |
| 777 | "value": null, |
| 778 | "assert": null, |
| 779 | "flexible": false, |
| 780 | "overwrite": false, |
| 781 | "source": "migration_sql.rs:154" |
| 782 | }, |
| 783 | "created_at": { |
| 784 | "type": "int", |
| 785 | "optional": false, |
| 786 | "default": null, |
| 787 | "readonly": false, |
| 788 | "value": null, |
| 789 | "assert": null, |
| 790 | "flexible": false, |
| 791 | "overwrite": false, |
| 792 | "source": "migration_sql.rs:155" |
| 793 | } |
| 794 | }, |
| 795 | "indexes": [ |
| 796 | { |
| 797 | "name": "board_creator", |
| 798 | "fields": [ |
| 799 | "creator" |
| 800 | ], |
| 801 | "unique": false, |
| 802 | "source": "migration_sql.rs:156" |
| 803 | }, |
| 804 | { |
| 805 | "name": "board_participants", |
| 806 | "fields": [ |
| 807 | "participants" |
| 808 | ], |
| 809 | "unique": false, |
| 810 | "source": "migration_sql.rs:160" |
| 811 | } |
| 812 | ] |
| 813 | }, |
| 814 | "board_stroke": { |
| 815 | "schemafull": true, |
| 816 | "source": "migration_sql.rs:162", |
| 817 | "fields": { |
| 818 | "board": { |
| 819 | "type": "record<board>", |
| 820 | "optional": false, |
| 821 | "default": null, |
| 822 | "readonly": false, |
| 823 | "value": null, |
| 824 | "assert": null, |
| 825 | "flexible": false, |
| 826 | "overwrite": false, |
| 827 | "source": "migration_sql.rs:163" |
| 828 | }, |
| 829 | "author": { |
| 830 | "type": "record<user>", |
| 831 | "optional": false, |
| 832 | "default": null, |
| 833 | "readonly": false, |
| 834 | "value": null, |
| 835 | "assert": null, |
| 836 | "flexible": false, |
| 837 | "overwrite": false, |
| 838 | "source": "migration_sql.rs:164" |
| 839 | }, |
| 840 | "kind": { |
| 841 | "type": "string", |
| 842 | "optional": false, |
| 843 | "default": null, |
| 844 | "readonly": false, |
| 845 | "value": null, |
| 846 | "assert": null, |
| 847 | "flexible": false, |
| 848 | "overwrite": false, |
| 849 | "source": "migration_sql.rs:168" |
| 850 | }, |
| 851 | "payload": { |
| 852 | "type": "option<string>", |
| 853 | "optional": true, |
| 854 | "default": null, |
| 855 | "readonly": false, |
| 856 | "value": null, |
| 857 | "assert": null, |
| 858 | "flexible": false, |
| 859 | "overwrite": false, |
| 860 | "source": "migration_sql.rs:169" |
| 861 | }, |
| 862 | "count": { |
| 863 | "type": "option<int>", |
| 864 | "optional": true, |
| 865 | "default": null, |
| 866 | "readonly": false, |
| 867 | "value": null, |
| 868 | "assert": null, |
| 869 | "flexible": false, |
| 870 | "overwrite": false, |
| 871 | "source": "migration_sql.rs:170" |
| 872 | }, |
| 873 | "epoch": { |
| 874 | "type": "int", |
| 875 | "optional": false, |
| 876 | "default": null, |
| 877 | "readonly": false, |
| 878 | "value": null, |
| 879 | "assert": null, |
| 880 | "flexible": false, |
| 881 | "overwrite": false, |
| 882 | "source": "migration_sql.rs:171" |
| 883 | }, |
| 884 | "created_at": { |
| 885 | "type": "int", |
| 886 | "optional": false, |
| 887 | "default": null, |
| 888 | "readonly": false, |
| 889 | "value": null, |
| 890 | "assert": null, |
| 891 | "flexible": false, |
| 892 | "overwrite": false, |
| 893 | "source": "migration_sql.rs:172" |
| 894 | } |
| 895 | }, |
| 896 | "indexes": [ |
| 897 | { |
| 898 | "name": "board_stroke_board_epoch", |
| 899 | "fields": [ |
| 900 | "board", |
| 901 | "epoch" |
| 902 | ], |
| 903 | "unique": false, |
| 904 | "source": "migration_sql.rs:175" |
| 905 | }, |
| 906 | { |
| 907 | "name": "board_stroke_board_kind", |
| 908 | "fields": [ |
| 909 | "board", |
| 910 | "kind" |
| 911 | ], |
| 912 | "unique": false, |
| 913 | "source": "migration_sql.rs:177" |
| 914 | } |
| 915 | ] |
| 916 | }, |
| 917 | "note_file": { |
| 918 | "schemafull": true, |
| 919 | "source": "migration_sql.rs:179", |
| 920 | "fields": { |
| 921 | "note": { |
| 922 | "type": "record<note>", |
| 923 | "optional": false, |
| 924 | "default": null, |
| 925 | "readonly": false, |
| 926 | "value": null, |
| 927 | "assert": null, |
| 928 | "flexible": false, |
| 929 | "overwrite": false, |
| 930 | "source": "migration_sql.rs:180" |
| 931 | }, |
| 932 | "name": { |
| 933 | "type": "string", |
| 934 | "optional": false, |
| 935 | "default": null, |
| 936 | "readonly": false, |
| 937 | "value": null, |
| 938 | "assert": null, |
| 939 | "flexible": false, |
| 940 | "overwrite": false, |
| 941 | "source": "migration_sql.rs:181" |
| 942 | }, |
| 943 | "content_type": { |
| 944 | "type": "string", |
| 945 | "optional": false, |
| 946 | "default": null, |
| 947 | "readonly": false, |
| 948 | "value": null, |
| 949 | "assert": null, |
| 950 | "flexible": false, |
| 951 | "overwrite": false, |
| 952 | "source": "migration_sql.rs:182" |
| 953 | }, |
| 954 | "size": { |
| 955 | "type": "int", |
| 956 | "optional": false, |
| 957 | "default": null, |
| 958 | "readonly": false, |
| 959 | "value": null, |
| 960 | "assert": null, |
| 961 | "flexible": false, |
| 962 | "overwrite": false, |
| 963 | "source": "migration_sql.rs:183" |
| 964 | } |
| 965 | }, |
| 966 | "indexes": [ |
| 967 | { |
| 968 | "name": "note_file_note", |
| 969 | "fields": [ |
| 970 | "note" |
| 971 | ], |
| 972 | "unique": false, |
| 973 | "source": "migration_sql.rs:184" |
| 974 | } |
| 975 | ] |
| 976 | }, |
| 977 | "course_note": { |
| 978 | "schemafull": true, |
| 979 | "source": "migration_sql.rs:186", |
| 980 | "fields": { |
| 981 | "course": { |
| 982 | "type": "record<course>", |
| 983 | "optional": false, |
| 984 | "default": null, |
| 985 | "readonly": false, |
| 986 | "value": null, |
| 987 | "assert": null, |
| 988 | "flexible": false, |
| 989 | "overwrite": false, |
| 990 | "source": "migration_sql.rs:187" |
| 991 | }, |
| 992 | "author": { |
| 993 | "type": "record<user>", |
| 994 | "optional": false, |
| 995 | "default": null, |
| 996 | "readonly": false, |
| 997 | "value": null, |
| 998 | "assert": null, |
| 999 | "flexible": false, |
| 1000 | "overwrite": false, |
| 1001 | "source": "migration_sql.rs:188" |
| 1002 | }, |
| 1003 | "title": { |
| 1004 | "type": "string", |
| 1005 | "optional": false, |
| 1006 | "default": null, |
| 1007 | "readonly": false, |
| 1008 | "value": null, |
| 1009 | "assert": null, |
| 1010 | "flexible": false, |
| 1011 | "overwrite": false, |
| 1012 | "source": "migration_sql.rs:189" |
| 1013 | }, |
| 1014 | "content": { |
| 1015 | "type": "string", |
| 1016 | "optional": false, |
| 1017 | "default": null, |
| 1018 | "readonly": false, |
| 1019 | "value": null, |
| 1020 | "assert": null, |
| 1021 | "flexible": false, |
| 1022 | "overwrite": false, |
| 1023 | "source": "migration_sql.rs:190" |
| 1024 | }, |
| 1025 | "file_count": { |
| 1026 | "type": "option<int>", |
| 1027 | "optional": true, |
| 1028 | "default": null, |
| 1029 | "readonly": false, |
| 1030 | "value": null, |
| 1031 | "assert": null, |
| 1032 | "flexible": false, |
| 1033 | "overwrite": false, |
| 1034 | "source": "migration_sql.rs:191" |
| 1035 | } |
| 1036 | }, |
| 1037 | "indexes": [ |
| 1038 | { |
| 1039 | "name": "course_note_course", |
| 1040 | "fields": [ |
| 1041 | "course" |
| 1042 | ], |
| 1043 | "unique": false, |
| 1044 | "source": "migration_sql.rs:192" |
| 1045 | } |
| 1046 | ] |
| 1047 | }, |
| 1048 | "course_note_file": { |
| 1049 | "schemafull": true, |
| 1050 | "source": "migration_sql.rs:194", |
| 1051 | "fields": { |
| 1052 | "course_note": { |
| 1053 | "type": "record<course_note>", |
| 1054 | "optional": false, |
| 1055 | "default": null, |
| 1056 | "readonly": false, |
| 1057 | "value": null, |
| 1058 | "assert": null, |
| 1059 | "flexible": false, |
| 1060 | "overwrite": false, |
| 1061 | "source": "migration_sql.rs:195" |
| 1062 | }, |
| 1063 | "name": { |
| 1064 | "type": "string", |
| 1065 | "optional": false, |
| 1066 | "default": null, |
| 1067 | "readonly": false, |
| 1068 | "value": null, |
| 1069 | "assert": null, |
| 1070 | "flexible": false, |
| 1071 | "overwrite": false, |
| 1072 | "source": "migration_sql.rs:196" |
| 1073 | }, |
| 1074 | "content_type": { |
| 1075 | "type": "string", |
| 1076 | "optional": false, |
| 1077 | "default": null, |
| 1078 | "readonly": false, |
| 1079 | "value": null, |
| 1080 | "assert": null, |
| 1081 | "flexible": false, |
| 1082 | "overwrite": false, |
| 1083 | "source": "migration_sql.rs:197" |
| 1084 | }, |
| 1085 | "size": { |
| 1086 | "type": "int", |
| 1087 | "optional": false, |
| 1088 | "default": null, |
| 1089 | "readonly": false, |
| 1090 | "value": null, |
| 1091 | "assert": null, |
| 1092 | "flexible": false, |
| 1093 | "overwrite": false, |
| 1094 | "source": "migration_sql.rs:198" |
| 1095 | } |
| 1096 | }, |
| 1097 | "indexes": [ |
| 1098 | { |
| 1099 | "name": "course_note_file_note", |
| 1100 | "fields": [ |
| 1101 | "course_note" |
| 1102 | ], |
| 1103 | "unique": false, |
| 1104 | "source": "migration_sql.rs:199" |
| 1105 | } |
| 1106 | ] |
| 1107 | }, |
| 1108 | "rag_output": { |
| 1109 | "schemafull": true, |
| 1110 | "source": "migration_sql.rs:206", |
| 1111 | "fields": { |
| 1112 | "course_note": { |
| 1113 | "type": "record<course_note>", |
| 1114 | "optional": false, |
| 1115 | "default": null, |
| 1116 | "readonly": false, |
| 1117 | "value": null, |
| 1118 | "assert": null, |
| 1119 | "flexible": false, |
| 1120 | "overwrite": false, |
| 1121 | "source": "migration_sql.rs:207" |
| 1122 | }, |
| 1123 | "course": { |
| 1124 | "type": "record<course>", |
| 1125 | "optional": false, |
| 1126 | "default": null, |
| 1127 | "readonly": false, |
| 1128 | "value": null, |
| 1129 | "assert": null, |
| 1130 | "flexible": false, |
| 1131 | "overwrite": false, |
| 1132 | "source": "migration_sql.rs:208" |
| 1133 | }, |
| 1134 | "sources": { |
| 1135 | "type": "array<record<course_note_file>>", |
| 1136 | "optional": false, |
| 1137 | "default": null, |
| 1138 | "readonly": false, |
| 1139 | "value": null, |
| 1140 | "assert": null, |
| 1141 | "flexible": false, |
| 1142 | "overwrite": false, |
| 1143 | "source": "migration_sql.rs:209" |
| 1144 | }, |
| 1145 | "payload": { |
| 1146 | "type": "object", |
| 1147 | "optional": false, |
| 1148 | "default": null, |
| 1149 | "readonly": false, |
| 1150 | "value": null, |
| 1151 | "assert": null, |
| 1152 | "flexible": true, |
| 1153 | "overwrite": false, |
| 1154 | "source": "migration_sql.rs:210" |
| 1155 | }, |
| 1156 | "generated_at": { |
| 1157 | "type": "int", |
| 1158 | "optional": false, |
| 1159 | "default": null, |
| 1160 | "readonly": false, |
| 1161 | "value": null, |
| 1162 | "assert": null, |
| 1163 | "flexible": false, |
| 1164 | "overwrite": false, |
| 1165 | "source": "migration_sql.rs:211" |
| 1166 | } |
| 1167 | }, |
| 1168 | "indexes": [ |
| 1169 | { |
| 1170 | "name": "rag_output_note", |
| 1171 | "fields": [ |
| 1172 | "course_note" |
| 1173 | ], |
| 1174 | "unique": false, |
| 1175 | "source": "migration_sql.rs:212" |
| 1176 | }, |
| 1177 | { |
| 1178 | "name": "rag_output_source", |
| 1179 | "fields": [ |
| 1180 | "sources" |
| 1181 | ], |
| 1182 | "unique": false, |
| 1183 | "source": "migration_sql.rs:217" |
| 1184 | } |
| 1185 | ], |
| 1186 | "removed_indexes": [ |
| 1187 | { |
| 1188 | "index": "rag_output_course", |
| 1189 | "source": "migration_sql.rs:214" |
| 1190 | } |
| 1191 | ] |
| 1192 | }, |
| 1193 | "chatbot_thread": { |
| 1194 | "schemafull": true, |
| 1195 | "source": "migration_sql.rs:224", |
| 1196 | "fields": { |
| 1197 | "user_id": { |
| 1198 | "type": "record<user>", |
| 1199 | "optional": false, |
| 1200 | "default": null, |
| 1201 | "readonly": true, |
| 1202 | "value": null, |
| 1203 | "assert": null, |
| 1204 | "flexible": false, |
| 1205 | "overwrite": false, |
| 1206 | "source": "migration_sql.rs:225" |
| 1207 | }, |
| 1208 | "title": { |
| 1209 | "type": "option<string>", |
| 1210 | "optional": true, |
| 1211 | "default": null, |
| 1212 | "readonly": false, |
| 1213 | "value": null, |
| 1214 | "assert": null, |
| 1215 | "flexible": false, |
| 1216 | "overwrite": false, |
| 1217 | "source": "migration_sql.rs:226" |
| 1218 | }, |
| 1219 | "created_at": { |
| 1220 | "type": "int", |
| 1221 | "optional": false, |
| 1222 | "default": null, |
| 1223 | "readonly": true, |
| 1224 | "value": null, |
| 1225 | "assert": null, |
| 1226 | "flexible": false, |
| 1227 | "overwrite": false, |
| 1228 | "source": "migration_sql.rs:227" |
| 1229 | }, |
| 1230 | "updated_at": { |
| 1231 | "type": "int", |
| 1232 | "optional": false, |
| 1233 | "default": null, |
| 1234 | "readonly": false, |
| 1235 | "value": null, |
| 1236 | "assert": null, |
| 1237 | "flexible": false, |
| 1238 | "overwrite": false, |
| 1239 | "source": "migration_sql.rs:228" |
| 1240 | } |
| 1241 | }, |
| 1242 | "indexes": [ |
| 1243 | { |
| 1244 | "name": "chatbot_thread_user_updated", |
| 1245 | "fields": [ |
| 1246 | "user_id", |
| 1247 | "updated_at" |
| 1248 | ], |
| 1249 | "unique": false, |
| 1250 | "source": "migration_sql.rs:229" |
| 1251 | } |
| 1252 | ] |
| 1253 | }, |
| 1254 | "chatbot_message": { |
| 1255 | "schemafull": true, |
| 1256 | "source": "migration_sql.rs:231", |
| 1257 | "fields": { |
| 1258 | "thread_id": { |
| 1259 | "type": "record<chatbot_thread>", |
| 1260 | "optional": false, |
| 1261 | "default": null, |
| 1262 | "readonly": true, |
| 1263 | "value": null, |
| 1264 | "assert": null, |
| 1265 | "flexible": false, |
| 1266 | "overwrite": false, |
| 1267 | "source": "migration_sql.rs:232" |
| 1268 | }, |
| 1269 | "user_id": { |
| 1270 | "type": "record<user>", |
| 1271 | "optional": false, |
| 1272 | "default": null, |
| 1273 | "readonly": true, |
| 1274 | "value": null, |
| 1275 | "assert": null, |
| 1276 | "flexible": false, |
| 1277 | "overwrite": false, |
| 1278 | "source": "migration_sql.rs:233" |
| 1279 | }, |
| 1280 | "role": { |
| 1281 | "type": "string", |
| 1282 | "optional": false, |
| 1283 | "default": null, |
| 1284 | "readonly": true, |
| 1285 | "value": null, |
| 1286 | "assert": null, |
| 1287 | "flexible": false, |
| 1288 | "overwrite": false, |
| 1289 | "source": "migration_sql.rs:234" |
| 1290 | }, |
| 1291 | "content": { |
| 1292 | "type": "string", |
| 1293 | "optional": false, |
| 1294 | "default": null, |
| 1295 | "readonly": false, |
| 1296 | "value": null, |
| 1297 | "assert": null, |
| 1298 | "flexible": false, |
| 1299 | "overwrite": false, |
| 1300 | "source": "migration_sql.rs:235" |
| 1301 | }, |
| 1302 | "status": { |
| 1303 | "type": "string", |
| 1304 | "optional": false, |
| 1305 | "default": null, |
| 1306 | "readonly": false, |
| 1307 | "value": null, |
| 1308 | "assert": null, |
| 1309 | "flexible": false, |
| 1310 | "overwrite": false, |
| 1311 | "source": "migration_sql.rs:236" |
| 1312 | }, |
| 1313 | "truncated": { |
| 1314 | "type": "bool", |
| 1315 | "optional": false, |
| 1316 | "default": "false", |
| 1317 | "readonly": false, |
| 1318 | "value": null, |
| 1319 | "assert": null, |
| 1320 | "flexible": false, |
| 1321 | "overwrite": false, |
| 1322 | "source": "migration_sql.rs:237" |
| 1323 | }, |
| 1324 | "error_code": { |
| 1325 | "type": "option<string>", |
| 1326 | "optional": true, |
| 1327 | "default": null, |
| 1328 | "readonly": false, |
| 1329 | "value": null, |
| 1330 | "assert": null, |
| 1331 | "flexible": false, |
| 1332 | "overwrite": false, |
| 1333 | "source": "migration_sql.rs:238" |
| 1334 | }, |
| 1335 | "created_at": { |
| 1336 | "type": "int", |
| 1337 | "optional": false, |
| 1338 | "default": null, |
| 1339 | "readonly": true, |
| 1340 | "value": null, |
| 1341 | "assert": null, |
| 1342 | "flexible": false, |
| 1343 | "overwrite": false, |
| 1344 | "source": "migration_sql.rs:239" |
| 1345 | }, |
| 1346 | "completed_at": { |
| 1347 | "type": "option<int>", |
| 1348 | "optional": true, |
| 1349 | "default": null, |
| 1350 | "readonly": false, |
| 1351 | "value": null, |
| 1352 | "assert": null, |
| 1353 | "flexible": false, |
| 1354 | "overwrite": false, |
| 1355 | "source": "migration_sql.rs:240" |
| 1356 | } |
| 1357 | }, |
| 1358 | "indexes": [ |
| 1359 | { |
| 1360 | "name": "chatbot_message_thread_created", |
| 1361 | "fields": [ |
| 1362 | "thread_id", |
| 1363 | "created_at" |
| 1364 | ], |
| 1365 | "unique": false, |
| 1366 | "source": "migration_sql.rs:247" |
| 1367 | }, |
| 1368 | { |
| 1369 | "name": "chatbot_message_user", |
| 1370 | "fields": [ |
| 1371 | "user_id" |
| 1372 | ], |
| 1373 | "unique": false, |
| 1374 | "source": "migration_sql.rs:248" |
| 1375 | }, |
| 1376 | { |
| 1377 | "name": "chatbot_message_status_created", |
| 1378 | "fields": [ |
| 1379 | "status", |
| 1380 | "created_at" |
| 1381 | ], |
| 1382 | "unique": false, |
| 1383 | "source": "migration_sql.rs:250" |
| 1384 | } |
| 1385 | ], |
| 1386 | "removed_fields": [ |
| 1387 | { |
| 1388 | "field": "claimed_by", |
| 1389 | "source": "migration_sql.rs:245" |
| 1390 | }, |
| 1391 | { |
| 1392 | "field": "claimed_at", |
| 1393 | "source": "migration_sql.rs:246" |
| 1394 | } |
| 1395 | ] |
| 1396 | }, |
| 1397 | "rate_limit": { |
| 1398 | "schemafull": true, |
| 1399 | "source": "migration_sql.rs:268", |
| 1400 | "fields": { |
| 1401 | "hits": { |
| 1402 | "type": "int", |
| 1403 | "optional": false, |
| 1404 | "default": "0", |
| 1405 | "readonly": false, |
| 1406 | "value": null, |
| 1407 | "assert": null, |
| 1408 | "flexible": false, |
| 1409 | "overwrite": false, |
| 1410 | "source": "migration_sql.rs:269" |
| 1411 | }, |
| 1412 | "window_start": { |
| 1413 | "type": "int", |
| 1414 | "optional": false, |
| 1415 | "default": null, |
| 1416 | "readonly": false, |
| 1417 | "value": null, |
| 1418 | "assert": null, |
| 1419 | "flexible": false, |
| 1420 | "overwrite": false, |
| 1421 | "source": "migration_sql.rs:270" |
| 1422 | } |
| 1423 | }, |
| 1424 | "indexes": [] |
| 1425 | }, |
| 1426 | "event": { |
| 1427 | "schemafull": true, |
| 1428 | "source": "migration_sql.rs:272", |
| 1429 | "fields": { |
| 1430 | "creator": { |
| 1431 | "type": "record<user>", |
| 1432 | "optional": false, |
| 1433 | "default": null, |
| 1434 | "readonly": false, |
| 1435 | "value": null, |
| 1436 | "assert": null, |
| 1437 | "flexible": false, |
| 1438 | "overwrite": false, |
| 1439 | "source": "migration_sql.rs:273" |
| 1440 | }, |
| 1441 | "title": { |
| 1442 | "type": "string", |
| 1443 | "optional": false, |
| 1444 | "default": null, |
| 1445 | "readonly": false, |
| 1446 | "value": null, |
| 1447 | "assert": null, |
| 1448 | "flexible": false, |
| 1449 | "overwrite": false, |
| 1450 | "source": "migration_sql.rs:274" |
| 1451 | }, |
| 1452 | "description": { |
| 1453 | "type": "string", |
| 1454 | "optional": false, |
| 1455 | "default": null, |
| 1456 | "readonly": false, |
| 1457 | "value": null, |
| 1458 | "assert": null, |
| 1459 | "flexible": false, |
| 1460 | "overwrite": false, |
| 1461 | "source": "migration_sql.rs:275" |
| 1462 | }, |
| 1463 | "audience": { |
| 1464 | "type": "object", |
| 1465 | "optional": false, |
| 1466 | "default": null, |
| 1467 | "readonly": false, |
| 1468 | "value": null, |
| 1469 | "assert": null, |
| 1470 | "flexible": false, |
| 1471 | "overwrite": false, |
| 1472 | "source": "migration_sql.rs:276" |
| 1473 | }, |
| 1474 | "audience.kind": { |
| 1475 | "type": "string", |
| 1476 | "optional": false, |
| 1477 | "default": null, |
| 1478 | "readonly": false, |
| 1479 | "value": null, |
| 1480 | "assert": null, |
| 1481 | "flexible": false, |
| 1482 | "overwrite": false, |
| 1483 | "source": "migration_sql.rs:277" |
| 1484 | }, |
| 1485 | "audience.role": { |
| 1486 | "type": "option<string>", |
| 1487 | "optional": true, |
| 1488 | "default": null, |
| 1489 | "readonly": false, |
| 1490 | "value": null, |
| 1491 | "assert": null, |
| 1492 | "flexible": false, |
| 1493 | "overwrite": false, |
| 1494 | "source": "migration_sql.rs:278" |
| 1495 | }, |
| 1496 | "audience.course": { |
| 1497 | "type": "option<record<course>>", |
| 1498 | "optional": true, |
| 1499 | "default": null, |
| 1500 | "readonly": false, |
| 1501 | "value": null, |
| 1502 | "assert": null, |
| 1503 | "flexible": false, |
| 1504 | "overwrite": false, |
| 1505 | "source": "migration_sql.rs:279" |
| 1506 | }, |
| 1507 | "audience.class": { |
| 1508 | "type": "option<record<class_group>>", |
| 1509 | "optional": true, |
| 1510 | "default": null, |
| 1511 | "readonly": false, |
| 1512 | "value": null, |
| 1513 | "assert": null, |
| 1514 | "flexible": false, |
| 1515 | "overwrite": false, |
| 1516 | "source": "migration_sql.rs:280" |
| 1517 | }, |
| 1518 | "audience.capacity": { |
| 1519 | "type": "option<int>", |
| 1520 | "optional": true, |
| 1521 | "default": null, |
| 1522 | "readonly": false, |
| 1523 | "value": null, |
| 1524 | "assert": null, |
| 1525 | "flexible": false, |
| 1526 | "overwrite": false, |
| 1527 | "source": "migration_sql.rs:281" |
| 1528 | }, |
| 1529 | "registration_count": { |
| 1530 | "type": "option<int>", |
| 1531 | "optional": true, |
| 1532 | "default": null, |
| 1533 | "readonly": false, |
| 1534 | "value": null, |
| 1535 | "assert": null, |
| 1536 | "flexible": false, |
| 1537 | "overwrite": false, |
| 1538 | "source": "migration_sql.rs:285" |
| 1539 | }, |
| 1540 | "starts_at": { |
| 1541 | "type": "option<int>", |
| 1542 | "optional": true, |
| 1543 | "default": null, |
| 1544 | "readonly": false, |
| 1545 | "value": null, |
| 1546 | "assert": null, |
| 1547 | "flexible": false, |
| 1548 | "overwrite": false, |
| 1549 | "source": "migration_sql.rs:287" |
| 1550 | }, |
| 1551 | "ends_at": { |
| 1552 | "type": "option<int>", |
| 1553 | "optional": true, |
| 1554 | "default": null, |
| 1555 | "readonly": false, |
| 1556 | "value": null, |
| 1557 | "assert": null, |
| 1558 | "flexible": false, |
| 1559 | "overwrite": false, |
| 1560 | "source": "migration_sql.rs:288" |
| 1561 | } |
| 1562 | }, |
| 1563 | "indexes": [], |
| 1564 | "removed_fields": [ |
| 1565 | { |
| 1566 | "field": "audience.users", |
| 1567 | "source": "migration_sql.rs:286" |
| 1568 | } |
| 1569 | ] |
| 1570 | }, |
| 1571 | "attendance": { |
| 1572 | "schemafull": true, |
| 1573 | "source": "migration_sql.rs:290", |
| 1574 | "fields": { |
| 1575 | "event": { |
| 1576 | "type": "record<event>", |
| 1577 | "optional": false, |
| 1578 | "default": null, |
| 1579 | "readonly": false, |
| 1580 | "value": null, |
| 1581 | "assert": null, |
| 1582 | "flexible": false, |
| 1583 | "overwrite": false, |
| 1584 | "source": "migration_sql.rs:291" |
| 1585 | }, |
| 1586 | "user": { |
| 1587 | "type": "record<user>", |
| 1588 | "optional": false, |
| 1589 | "default": null, |
| 1590 | "readonly": false, |
| 1591 | "value": null, |
| 1592 | "assert": null, |
| 1593 | "flexible": false, |
| 1594 | "overwrite": false, |
| 1595 | "source": "migration_sql.rs:292" |
| 1596 | }, |
| 1597 | "status": { |
| 1598 | "type": "string", |
| 1599 | "optional": false, |
| 1600 | "default": null, |
| 1601 | "readonly": false, |
| 1602 | "value": null, |
| 1603 | "assert": null, |
| 1604 | "flexible": false, |
| 1605 | "overwrite": false, |
| 1606 | "source": "migration_sql.rs:293" |
| 1607 | }, |
| 1608 | "marked_by": { |
| 1609 | "type": "record<user>", |
| 1610 | "optional": false, |
| 1611 | "default": null, |
| 1612 | "readonly": false, |
| 1613 | "value": null, |
| 1614 | "assert": null, |
| 1615 | "flexible": false, |
| 1616 | "overwrite": false, |
| 1617 | "source": "migration_sql.rs:294" |
| 1618 | } |
| 1619 | }, |
| 1620 | "indexes": [ |
| 1621 | { |
| 1622 | "name": "attendance_event_user", |
| 1623 | "fields": [ |
| 1624 | "event", |
| 1625 | "user" |
| 1626 | ], |
| 1627 | "unique": true, |
| 1628 | "source": "migration_sql.rs:295" |
| 1629 | }, |
| 1630 | { |
| 1631 | "name": "attendance_user", |
| 1632 | "fields": [ |
| 1633 | "user" |
| 1634 | ], |
| 1635 | "unique": false, |
| 1636 | "source": "migration_sql.rs:296" |
| 1637 | } |
| 1638 | ] |
| 1639 | }, |
| 1640 | "registration": { |
| 1641 | "schemafull": true, |
| 1642 | "source": "migration_sql.rs:298", |
| 1643 | "fields": { |
| 1644 | "event": { |
| 1645 | "type": "record<event>", |
| 1646 | "optional": false, |
| 1647 | "default": null, |
| 1648 | "readonly": false, |
| 1649 | "value": null, |
| 1650 | "assert": null, |
| 1651 | "flexible": false, |
| 1652 | "overwrite": false, |
| 1653 | "source": "migration_sql.rs:299" |
| 1654 | }, |
| 1655 | "user": { |
| 1656 | "type": "record<user>", |
| 1657 | "optional": false, |
| 1658 | "default": null, |
| 1659 | "readonly": false, |
| 1660 | "value": null, |
| 1661 | "assert": null, |
| 1662 | "flexible": false, |
| 1663 | "overwrite": false, |
| 1664 | "source": "migration_sql.rs:300" |
| 1665 | }, |
| 1666 | "registered_by": { |
| 1667 | "type": "record<user>", |
| 1668 | "optional": false, |
| 1669 | "default": null, |
| 1670 | "readonly": false, |
| 1671 | "value": null, |
| 1672 | "assert": null, |
| 1673 | "flexible": false, |
| 1674 | "overwrite": false, |
| 1675 | "source": "migration_sql.rs:301" |
| 1676 | } |
| 1677 | }, |
| 1678 | "indexes": [ |
| 1679 | { |
| 1680 | "name": "registration_event_user", |
| 1681 | "fields": [ |
| 1682 | "event", |
| 1683 | "user" |
| 1684 | ], |
| 1685 | "unique": true, |
| 1686 | "source": "migration_sql.rs:302" |
| 1687 | }, |
| 1688 | { |
| 1689 | "name": "registration_event", |
| 1690 | "fields": [ |
| 1691 | "event" |
| 1692 | ], |
| 1693 | "unique": false, |
| 1694 | "source": "migration_sql.rs:303" |
| 1695 | } |
| 1696 | ] |
| 1697 | }, |
| 1698 | "term": { |
| 1699 | "schemafull": true, |
| 1700 | "source": "migration_sql.rs:305", |
| 1701 | "fields": { |
| 1702 | "name": { |
| 1703 | "type": "string", |
| 1704 | "optional": false, |
| 1705 | "default": null, |
| 1706 | "readonly": false, |
| 1707 | "value": null, |
| 1708 | "assert": null, |
| 1709 | "flexible": false, |
| 1710 | "overwrite": false, |
| 1711 | "source": "migration_sql.rs:306" |
| 1712 | }, |
| 1713 | "starts_at": { |
| 1714 | "type": "int", |
| 1715 | "optional": false, |
| 1716 | "default": null, |
| 1717 | "readonly": false, |
| 1718 | "value": null, |
| 1719 | "assert": null, |
| 1720 | "flexible": false, |
| 1721 | "overwrite": false, |
| 1722 | "source": "migration_sql.rs:307" |
| 1723 | }, |
| 1724 | "ends_at": { |
| 1725 | "type": "int", |
| 1726 | "optional": false, |
| 1727 | "default": null, |
| 1728 | "readonly": false, |
| 1729 | "value": null, |
| 1730 | "assert": null, |
| 1731 | "flexible": false, |
| 1732 | "overwrite": false, |
| 1733 | "source": "migration_sql.rs:308" |
| 1734 | }, |
| 1735 | "archived_at": { |
| 1736 | "type": "option<int>", |
| 1737 | "optional": true, |
| 1738 | "default": null, |
| 1739 | "readonly": false, |
| 1740 | "value": null, |
| 1741 | "assert": null, |
| 1742 | "flexible": false, |
| 1743 | "overwrite": false, |
| 1744 | "source": "migration_sql.rs:312" |
| 1745 | }, |
| 1746 | "course_count": { |
| 1747 | "type": "option<int>", |
| 1748 | "optional": true, |
| 1749 | "default": null, |
| 1750 | "readonly": false, |
| 1751 | "value": null, |
| 1752 | "assert": null, |
| 1753 | "flexible": false, |
| 1754 | "overwrite": false, |
| 1755 | "source": "migration_sql.rs:316" |
| 1756 | }, |
| 1757 | "class_count": { |
| 1758 | "type": "option<int>", |
| 1759 | "optional": true, |
| 1760 | "default": null, |
| 1761 | "readonly": false, |
| 1762 | "value": null, |
| 1763 | "assert": null, |
| 1764 | "flexible": false, |
| 1765 | "overwrite": false, |
| 1766 | "source": "migration_sql.rs:319" |
| 1767 | } |
| 1768 | }, |
| 1769 | "indexes": [] |
| 1770 | }, |
| 1771 | "course": { |
| 1772 | "schemafull": true, |
| 1773 | "source": "migration_sql.rs:321", |
| 1774 | "fields": { |
| 1775 | "creator": { |
| 1776 | "type": "record<user>", |
| 1777 | "optional": false, |
| 1778 | "default": null, |
| 1779 | "readonly": false, |
| 1780 | "value": null, |
| 1781 | "assert": null, |
| 1782 | "flexible": false, |
| 1783 | "overwrite": false, |
| 1784 | "source": "migration_sql.rs:322" |
| 1785 | }, |
| 1786 | "teachers": { |
| 1787 | "type": "array<record<user>>", |
| 1788 | "optional": false, |
| 1789 | "default": "[]", |
| 1790 | "readonly": false, |
| 1791 | "value": null, |
| 1792 | "assert": null, |
| 1793 | "flexible": false, |
| 1794 | "overwrite": false, |
| 1795 | "source": "migration_sql.rs:323" |
| 1796 | }, |
| 1797 | "teachers[*]": { |
| 1798 | "type": "record<user>", |
| 1799 | "optional": false, |
| 1800 | "default": null, |
| 1801 | "readonly": false, |
| 1802 | "value": null, |
| 1803 | "assert": null, |
| 1804 | "flexible": false, |
| 1805 | "overwrite": false, |
| 1806 | "source": "migration_sql.rs:324" |
| 1807 | }, |
| 1808 | "title": { |
| 1809 | "type": "string", |
| 1810 | "optional": false, |
| 1811 | "default": null, |
| 1812 | "readonly": false, |
| 1813 | "value": null, |
| 1814 | "assert": null, |
| 1815 | "flexible": false, |
| 1816 | "overwrite": false, |
| 1817 | "source": "migration_sql.rs:325" |
| 1818 | }, |
| 1819 | "description": { |
| 1820 | "type": "string", |
| 1821 | "optional": false, |
| 1822 | "default": null, |
| 1823 | "readonly": false, |
| 1824 | "value": null, |
| 1825 | "assert": null, |
| 1826 | "flexible": false, |
| 1827 | "overwrite": false, |
| 1828 | "source": "migration_sql.rs:326" |
| 1829 | }, |
| 1830 | "kind": { |
| 1831 | "type": "string", |
| 1832 | "optional": false, |
| 1833 | "default": "'course'", |
| 1834 | "readonly": false, |
| 1835 | "value": null, |
| 1836 | "assert": null, |
| 1837 | "flexible": false, |
| 1838 | "overwrite": false, |
| 1839 | "source": "migration_sql.rs:327" |
| 1840 | }, |
| 1841 | "term": { |
| 1842 | "type": "option<record<term>>", |
| 1843 | "optional": true, |
| 1844 | "default": null, |
| 1845 | "readonly": false, |
| 1846 | "value": null, |
| 1847 | "assert": null, |
| 1848 | "flexible": false, |
| 1849 | "overwrite": false, |
| 1850 | "source": "migration_sql.rs:328" |
| 1851 | }, |
| 1852 | "capacity": { |
| 1853 | "type": "option<int>", |
| 1854 | "optional": true, |
| 1855 | "default": null, |
| 1856 | "readonly": false, |
| 1857 | "value": null, |
| 1858 | "assert": null, |
| 1859 | "flexible": false, |
| 1860 | "overwrite": false, |
| 1861 | "source": "migration_sql.rs:329" |
| 1862 | }, |
| 1863 | "enrollment_count": { |
| 1864 | "type": "option<int>", |
| 1865 | "optional": true, |
| 1866 | "default": null, |
| 1867 | "readonly": false, |
| 1868 | "value": null, |
| 1869 | "assert": null, |
| 1870 | "flexible": false, |
| 1871 | "overwrite": false, |
| 1872 | "source": "migration_sql.rs:330" |
| 1873 | } |
| 1874 | }, |
| 1875 | "indexes": [] |
| 1876 | }, |
| 1877 | "subject": { |
| 1878 | "schemafull": true, |
| 1879 | "source": "migration_sql.rs:332", |
| 1880 | "fields": { |
| 1881 | "course": { |
| 1882 | "type": "record<course>", |
| 1883 | "optional": false, |
| 1884 | "default": null, |
| 1885 | "readonly": false, |
| 1886 | "value": null, |
| 1887 | "assert": null, |
| 1888 | "flexible": false, |
| 1889 | "overwrite": false, |
| 1890 | "source": "migration_sql.rs:333" |
| 1891 | }, |
| 1892 | "name": { |
| 1893 | "type": "string", |
| 1894 | "optional": false, |
| 1895 | "default": null, |
| 1896 | "readonly": false, |
| 1897 | "value": null, |
| 1898 | "assert": null, |
| 1899 | "flexible": false, |
| 1900 | "overwrite": false, |
| 1901 | "source": "migration_sql.rs:334" |
| 1902 | }, |
| 1903 | "description": { |
| 1904 | "type": "string", |
| 1905 | "optional": false, |
| 1906 | "default": null, |
| 1907 | "readonly": false, |
| 1908 | "value": null, |
| 1909 | "assert": null, |
| 1910 | "flexible": false, |
| 1911 | "overwrite": false, |
| 1912 | "source": "migration_sql.rs:335" |
| 1913 | }, |
| 1914 | "exam_question_count": { |
| 1915 | "type": "option<int>", |
| 1916 | "optional": true, |
| 1917 | "default": null, |
| 1918 | "readonly": false, |
| 1919 | "value": null, |
| 1920 | "assert": null, |
| 1921 | "flexible": false, |
| 1922 | "overwrite": false, |
| 1923 | "source": "migration_sql.rs:339" |
| 1924 | }, |
| 1925 | "homework_count": { |
| 1926 | "type": "option<int>", |
| 1927 | "optional": true, |
| 1928 | "default": null, |
| 1929 | "readonly": false, |
| 1930 | "value": null, |
| 1931 | "assert": null, |
| 1932 | "flexible": false, |
| 1933 | "overwrite": false, |
| 1934 | "source": "migration_sql.rs:340" |
| 1935 | } |
| 1936 | }, |
| 1937 | "indexes": [ |
| 1938 | { |
| 1939 | "name": "subject_course", |
| 1940 | "fields": [ |
| 1941 | "course" |
| 1942 | ], |
| 1943 | "unique": false, |
| 1944 | "source": "migration_sql.rs:341" |
| 1945 | } |
| 1946 | ] |
| 1947 | }, |
| 1948 | "class_group": { |
| 1949 | "schemafull": true, |
| 1950 | "source": "migration_sql.rs:346", |
| 1951 | "fields": { |
| 1952 | "name": { |
| 1953 | "type": "string", |
| 1954 | "optional": false, |
| 1955 | "default": null, |
| 1956 | "readonly": false, |
| 1957 | "value": null, |
| 1958 | "assert": null, |
| 1959 | "flexible": false, |
| 1960 | "overwrite": false, |
| 1961 | "source": "migration_sql.rs:347" |
| 1962 | }, |
| 1963 | "grade": { |
| 1964 | "type": "option<string>", |
| 1965 | "optional": true, |
| 1966 | "default": null, |
| 1967 | "readonly": false, |
| 1968 | "value": null, |
| 1969 | "assert": null, |
| 1970 | "flexible": false, |
| 1971 | "overwrite": false, |
| 1972 | "source": "migration_sql.rs:348" |
| 1973 | }, |
| 1974 | "term": { |
| 1975 | "type": "option<record<term>>", |
| 1976 | "optional": true, |
| 1977 | "default": null, |
| 1978 | "readonly": false, |
| 1979 | "value": null, |
| 1980 | "assert": null, |
| 1981 | "flexible": false, |
| 1982 | "overwrite": false, |
| 1983 | "source": "migration_sql.rs:349" |
| 1984 | }, |
| 1985 | "creator": { |
| 1986 | "type": "record<user>", |
| 1987 | "optional": false, |
| 1988 | "default": null, |
| 1989 | "readonly": false, |
| 1990 | "value": null, |
| 1991 | "assert": null, |
| 1992 | "flexible": false, |
| 1993 | "overwrite": false, |
| 1994 | "source": "migration_sql.rs:350" |
| 1995 | }, |
| 1996 | "teacher": { |
| 1997 | "type": "option<record<user>>", |
| 1998 | "optional": true, |
| 1999 | "default": null, |
| 2000 | "readonly": false, |
| 2001 | "value": null, |
| 2002 | "assert": null, |
| 2003 | "flexible": false, |
| 2004 | "overwrite": false, |
| 2005 | "source": "migration_sql.rs:351" |
| 2006 | }, |
| 2007 | "class_member_count": { |
| 2008 | "type": "option<int>", |
| 2009 | "optional": true, |
| 2010 | "default": null, |
| 2011 | "readonly": false, |
| 2012 | "value": null, |
| 2013 | "assert": null, |
| 2014 | "flexible": false, |
| 2015 | "overwrite": false, |
| 2016 | "source": "migration_sql.rs:352" |
| 2017 | }, |
| 2018 | "class_course_count": { |
| 2019 | "type": "option<int>", |
| 2020 | "optional": true, |
| 2021 | "default": null, |
| 2022 | "readonly": false, |
| 2023 | "value": null, |
| 2024 | "assert": null, |
| 2025 | "flexible": false, |
| 2026 | "overwrite": false, |
| 2027 | "source": "migration_sql.rs:353" |
| 2028 | } |
| 2029 | }, |
| 2030 | "indexes": [ |
| 2031 | { |
| 2032 | "name": "class_group_grade", |
| 2033 | "fields": [ |
| 2034 | "grade" |
| 2035 | ], |
| 2036 | "unique": false, |
| 2037 | "source": "migration_sql.rs:356" |
| 2038 | } |
| 2039 | ] |
| 2040 | }, |
| 2041 | "class_blueprint": { |
| 2042 | "schemafull": true, |
| 2043 | "source": "migration_sql.rs:364", |
| 2044 | "fields": { |
| 2045 | "grade": { |
| 2046 | "type": "string", |
| 2047 | "optional": false, |
| 2048 | "default": null, |
| 2049 | "readonly": false, |
| 2050 | "value": null, |
| 2051 | "assert": null, |
| 2052 | "flexible": false, |
| 2053 | "overwrite": false, |
| 2054 | "source": "migration_sql.rs:365" |
| 2055 | }, |
| 2056 | "courses": { |
| 2057 | "type": "array<record<course>>", |
| 2058 | "optional": false, |
| 2059 | "default": null, |
| 2060 | "readonly": false, |
| 2061 | "value": null, |
| 2062 | "assert": null, |
| 2063 | "flexible": false, |
| 2064 | "overwrite": false, |
| 2065 | "source": "migration_sql.rs:366" |
| 2066 | }, |
| 2067 | "creator": { |
| 2068 | "type": "record<user>", |
| 2069 | "optional": false, |
| 2070 | "default": null, |
| 2071 | "readonly": false, |
| 2072 | "value": null, |
| 2073 | "assert": null, |
| 2074 | "flexible": false, |
| 2075 | "overwrite": false, |
| 2076 | "source": "migration_sql.rs:367" |
| 2077 | } |
| 2078 | }, |
| 2079 | "indexes": [] |
| 2080 | }, |
| 2081 | "class_member": { |
| 2082 | "schemafull": true, |
| 2083 | "source": "migration_sql.rs:369", |
| 2084 | "fields": { |
| 2085 | "class": { |
| 2086 | "type": "record<class_group>", |
| 2087 | "optional": false, |
| 2088 | "default": null, |
| 2089 | "readonly": false, |
| 2090 | "value": null, |
| 2091 | "assert": null, |
| 2092 | "flexible": false, |
| 2093 | "overwrite": false, |
| 2094 | "source": "migration_sql.rs:370" |
| 2095 | }, |
| 2096 | "user": { |
| 2097 | "type": "record<user>", |
| 2098 | "optional": false, |
| 2099 | "default": null, |
| 2100 | "readonly": false, |
| 2101 | "value": null, |
| 2102 | "assert": null, |
| 2103 | "flexible": false, |
| 2104 | "overwrite": false, |
| 2105 | "source": "migration_sql.rs:371" |
| 2106 | }, |
| 2107 | "added_by": { |
| 2108 | "type": "record<user>", |
| 2109 | "optional": false, |
| 2110 | "default": null, |
| 2111 | "readonly": false, |
| 2112 | "value": null, |
| 2113 | "assert": null, |
| 2114 | "flexible": false, |
| 2115 | "overwrite": false, |
| 2116 | "source": "migration_sql.rs:372" |
| 2117 | }, |
| 2118 | "added_at": { |
| 2119 | "type": "option<int>", |
| 2120 | "optional": true, |
| 2121 | "default": null, |
| 2122 | "readonly": false, |
| 2123 | "value": null, |
| 2124 | "assert": null, |
| 2125 | "flexible": false, |
| 2126 | "overwrite": false, |
| 2127 | "source": "migration_sql.rs:380" |
| 2128 | } |
| 2129 | }, |
| 2130 | "indexes": [ |
| 2131 | { |
| 2132 | "name": "class_member_class_user", |
| 2133 | "fields": [ |
| 2134 | "class", |
| 2135 | "user" |
| 2136 | ], |
| 2137 | "unique": true, |
| 2138 | "source": "migration_sql.rs:381" |
| 2139 | }, |
| 2140 | { |
| 2141 | "name": "class_member_class", |
| 2142 | "fields": [ |
| 2143 | "class" |
| 2144 | ], |
| 2145 | "unique": false, |
| 2146 | "source": "migration_sql.rs:382" |
| 2147 | }, |
| 2148 | { |
| 2149 | "name": "class_member_user", |
| 2150 | "fields": [ |
| 2151 | "user" |
| 2152 | ], |
| 2153 | "unique": false, |
| 2154 | "source": "migration_sql.rs:383" |
| 2155 | } |
| 2156 | ] |
| 2157 | }, |
| 2158 | "class_course": { |
| 2159 | "schemafull": true, |
| 2160 | "source": "migration_sql.rs:385", |
| 2161 | "fields": { |
| 2162 | "class": { |
| 2163 | "type": "record<class_group>", |
| 2164 | "optional": false, |
| 2165 | "default": null, |
| 2166 | "readonly": false, |
| 2167 | "value": null, |
| 2168 | "assert": null, |
| 2169 | "flexible": false, |
| 2170 | "overwrite": false, |
| 2171 | "source": "migration_sql.rs:386" |
| 2172 | }, |
| 2173 | "course": { |
| 2174 | "type": "record<course>", |
| 2175 | "optional": false, |
| 2176 | "default": null, |
| 2177 | "readonly": false, |
| 2178 | "value": null, |
| 2179 | "assert": null, |
| 2180 | "flexible": false, |
| 2181 | "overwrite": false, |
| 2182 | "source": "migration_sql.rs:387" |
| 2183 | }, |
| 2184 | "attached_by": { |
| 2185 | "type": "record<user>", |
| 2186 | "optional": false, |
| 2187 | "default": null, |
| 2188 | "readonly": false, |
| 2189 | "value": null, |
| 2190 | "assert": null, |
| 2191 | "flexible": false, |
| 2192 | "overwrite": false, |
| 2193 | "source": "migration_sql.rs:388" |
| 2194 | }, |
| 2195 | "attached_at": { |
| 2196 | "type": "option<int>", |
| 2197 | "optional": true, |
| 2198 | "default": null, |
| 2199 | "readonly": false, |
| 2200 | "value": null, |
| 2201 | "assert": null, |
| 2202 | "flexible": false, |
| 2203 | "overwrite": false, |
| 2204 | "source": "migration_sql.rs:391" |
| 2205 | }, |
| 2206 | "source": { |
| 2207 | "type": "option<record<class_blueprint>>", |
| 2208 | "optional": true, |
| 2209 | "default": null, |
| 2210 | "readonly": false, |
| 2211 | "value": null, |
| 2212 | "assert": null, |
| 2213 | "flexible": false, |
| 2214 | "overwrite": false, |
| 2215 | "source": "migration_sql.rs:401" |
| 2216 | } |
| 2217 | }, |
| 2218 | "indexes": [ |
| 2219 | { |
| 2220 | "name": "class_course_class_course", |
| 2221 | "fields": [ |
| 2222 | "class", |
| 2223 | "course" |
| 2224 | ], |
| 2225 | "unique": true, |
| 2226 | "source": "migration_sql.rs:402" |
| 2227 | }, |
| 2228 | { |
| 2229 | "name": "class_course_class", |
| 2230 | "fields": [ |
| 2231 | "class" |
| 2232 | ], |
| 2233 | "unique": false, |
| 2234 | "source": "migration_sql.rs:403" |
| 2235 | }, |
| 2236 | { |
| 2237 | "name": "class_course_course", |
| 2238 | "fields": [ |
| 2239 | "course" |
| 2240 | ], |
| 2241 | "unique": false, |
| 2242 | "source": "migration_sql.rs:404" |
| 2243 | } |
| 2244 | ] |
| 2245 | }, |
| 2246 | "enrollment": { |
| 2247 | "schemafull": true, |
| 2248 | "source": "migration_sql.rs:406", |
| 2249 | "fields": { |
| 2250 | "course": { |
| 2251 | "type": "record<course>", |
| 2252 | "optional": false, |
| 2253 | "default": null, |
| 2254 | "readonly": false, |
| 2255 | "value": null, |
| 2256 | "assert": null, |
| 2257 | "flexible": false, |
| 2258 | "overwrite": false, |
| 2259 | "source": "migration_sql.rs:407" |
| 2260 | }, |
| 2261 | "user": { |
| 2262 | "type": "record<user>", |
| 2263 | "optional": false, |
| 2264 | "default": null, |
| 2265 | "readonly": false, |
| 2266 | "value": null, |
| 2267 | "assert": null, |
| 2268 | "flexible": false, |
| 2269 | "overwrite": false, |
| 2270 | "source": "migration_sql.rs:408" |
| 2271 | }, |
| 2272 | "enrolled_by": { |
| 2273 | "type": "record<user>", |
| 2274 | "optional": false, |
| 2275 | "default": null, |
| 2276 | "readonly": false, |
| 2277 | "value": null, |
| 2278 | "assert": null, |
| 2279 | "flexible": false, |
| 2280 | "overwrite": false, |
| 2281 | "source": "migration_sql.rs:409" |
| 2282 | }, |
| 2283 | "source": { |
| 2284 | "type": "option<record<class_group>>", |
| 2285 | "optional": true, |
| 2286 | "default": null, |
| 2287 | "readonly": false, |
| 2288 | "value": null, |
| 2289 | "assert": null, |
| 2290 | "flexible": false, |
| 2291 | "overwrite": false, |
| 2292 | "source": "migration_sql.rs:413" |
| 2293 | } |
| 2294 | }, |
| 2295 | "indexes": [ |
| 2296 | { |
| 2297 | "name": "enrollment_course_user", |
| 2298 | "fields": [ |
| 2299 | "course", |
| 2300 | "user" |
| 2301 | ], |
| 2302 | "unique": true, |
| 2303 | "source": "migration_sql.rs:414" |
| 2304 | }, |
| 2305 | { |
| 2306 | "name": "enrollment_user", |
| 2307 | "fields": [ |
| 2308 | "user" |
| 2309 | ], |
| 2310 | "unique": false, |
| 2311 | "source": "migration_sql.rs:415" |
| 2312 | } |
| 2313 | ] |
| 2314 | }, |
| 2315 | "parent_link": { |
| 2316 | "schemafull": true, |
| 2317 | "source": "migration_sql.rs:417", |
| 2318 | "fields": { |
| 2319 | "parent": { |
| 2320 | "type": "record<user>", |
| 2321 | "optional": false, |
| 2322 | "default": null, |
| 2323 | "readonly": false, |
| 2324 | "value": null, |
| 2325 | "assert": null, |
| 2326 | "flexible": false, |
| 2327 | "overwrite": false, |
| 2328 | "source": "migration_sql.rs:418" |
| 2329 | }, |
| 2330 | "student": { |
| 2331 | "type": "record<user>", |
| 2332 | "optional": false, |
| 2333 | "default": null, |
| 2334 | "readonly": false, |
| 2335 | "value": null, |
| 2336 | "assert": null, |
| 2337 | "flexible": false, |
| 2338 | "overwrite": false, |
| 2339 | "source": "migration_sql.rs:419" |
| 2340 | }, |
| 2341 | "linked_by": { |
| 2342 | "type": "record<user>", |
| 2343 | "optional": false, |
| 2344 | "default": null, |
| 2345 | "readonly": false, |
| 2346 | "value": null, |
| 2347 | "assert": null, |
| 2348 | "flexible": false, |
| 2349 | "overwrite": false, |
| 2350 | "source": "migration_sql.rs:420" |
| 2351 | } |
| 2352 | }, |
| 2353 | "indexes": [ |
| 2354 | { |
| 2355 | "name": "parent_link_parent_student", |
| 2356 | "fields": [ |
| 2357 | "parent", |
| 2358 | "student" |
| 2359 | ], |
| 2360 | "unique": true, |
| 2361 | "source": "migration_sql.rs:421" |
| 2362 | }, |
| 2363 | { |
| 2364 | "name": "parent_link_parent", |
| 2365 | "fields": [ |
| 2366 | "parent" |
| 2367 | ], |
| 2368 | "unique": false, |
| 2369 | "source": "migration_sql.rs:422" |
| 2370 | }, |
| 2371 | { |
| 2372 | "name": "parent_link_student", |
| 2373 | "fields": [ |
| 2374 | "student" |
| 2375 | ], |
| 2376 | "unique": false, |
| 2377 | "source": "migration_sql.rs:423" |
| 2378 | } |
| 2379 | ] |
| 2380 | }, |
| 2381 | "course_session": { |
| 2382 | "schemafull": true, |
| 2383 | "source": "migration_sql.rs:425", |
| 2384 | "fields": { |
| 2385 | "course": { |
| 2386 | "type": "record<course>", |
| 2387 | "optional": false, |
| 2388 | "default": null, |
| 2389 | "readonly": false, |
| 2390 | "value": null, |
| 2391 | "assert": null, |
| 2392 | "flexible": false, |
| 2393 | "overwrite": false, |
| 2394 | "source": "migration_sql.rs:426" |
| 2395 | }, |
| 2396 | "teacher": { |
| 2397 | "type": "record<user>", |
| 2398 | "optional": false, |
| 2399 | "default": null, |
| 2400 | "readonly": false, |
| 2401 | "value": null, |
| 2402 | "assert": null, |
| 2403 | "flexible": false, |
| 2404 | "overwrite": false, |
| 2405 | "source": "migration_sql.rs:427" |
| 2406 | }, |
| 2407 | "topic": { |
| 2408 | "type": "string", |
| 2409 | "optional": false, |
| 2410 | "default": null, |
| 2411 | "readonly": false, |
| 2412 | "value": null, |
| 2413 | "assert": null, |
| 2414 | "flexible": false, |
| 2415 | "overwrite": false, |
| 2416 | "source": "migration_sql.rs:428" |
| 2417 | }, |
| 2418 | "starts_at": { |
| 2419 | "type": "int", |
| 2420 | "optional": false, |
| 2421 | "default": null, |
| 2422 | "readonly": false, |
| 2423 | "value": null, |
| 2424 | "assert": null, |
| 2425 | "flexible": false, |
| 2426 | "overwrite": false, |
| 2427 | "source": "migration_sql.rs:429" |
| 2428 | }, |
| 2429 | "ends_at": { |
| 2430 | "type": "option<int>", |
| 2431 | "optional": true, |
| 2432 | "default": null, |
| 2433 | "readonly": false, |
| 2434 | "value": null, |
| 2435 | "assert": null, |
| 2436 | "flexible": false, |
| 2437 | "overwrite": false, |
| 2438 | "source": "migration_sql.rs:430" |
| 2439 | }, |
| 2440 | "held_counted_at": { |
| 2441 | "type": "option<int>", |
| 2442 | "optional": true, |
| 2443 | "default": null, |
| 2444 | "readonly": false, |
| 2445 | "value": null, |
| 2446 | "assert": null, |
| 2447 | "flexible": false, |
| 2448 | "overwrite": false, |
| 2449 | "source": "migration_sql.rs:436" |
| 2450 | } |
| 2451 | }, |
| 2452 | "indexes": [ |
| 2453 | { |
| 2454 | "name": "course_session_course", |
| 2455 | "fields": [ |
| 2456 | "course" |
| 2457 | ], |
| 2458 | "unique": false, |
| 2459 | "source": "migration_sql.rs:437" |
| 2460 | } |
| 2461 | ] |
| 2462 | }, |
| 2463 | "session_attendance": { |
| 2464 | "schemafull": true, |
| 2465 | "source": "migration_sql.rs:439", |
| 2466 | "fields": { |
| 2467 | "session": { |
| 2468 | "type": "record<course_session>", |
| 2469 | "optional": false, |
| 2470 | "default": null, |
| 2471 | "readonly": false, |
| 2472 | "value": null, |
| 2473 | "assert": null, |
| 2474 | "flexible": false, |
| 2475 | "overwrite": false, |
| 2476 | "source": "migration_sql.rs:440" |
| 2477 | }, |
| 2478 | "course": { |
| 2479 | "type": "record<course>", |
| 2480 | "optional": false, |
| 2481 | "default": null, |
| 2482 | "readonly": false, |
| 2483 | "value": null, |
| 2484 | "assert": null, |
| 2485 | "flexible": false, |
| 2486 | "overwrite": false, |
| 2487 | "source": "migration_sql.rs:441" |
| 2488 | }, |
| 2489 | "user": { |
| 2490 | "type": "record<user>", |
| 2491 | "optional": false, |
| 2492 | "default": null, |
| 2493 | "readonly": false, |
| 2494 | "value": null, |
| 2495 | "assert": null, |
| 2496 | "flexible": false, |
| 2497 | "overwrite": false, |
| 2498 | "source": "migration_sql.rs:442" |
| 2499 | }, |
| 2500 | "status": { |
| 2501 | "type": "string", |
| 2502 | "optional": false, |
| 2503 | "default": null, |
| 2504 | "readonly": false, |
| 2505 | "value": null, |
| 2506 | "assert": null, |
| 2507 | "flexible": false, |
| 2508 | "overwrite": false, |
| 2509 | "source": "migration_sql.rs:443" |
| 2510 | }, |
| 2511 | "marked_by": { |
| 2512 | "type": "record<user>", |
| 2513 | "optional": false, |
| 2514 | "default": null, |
| 2515 | "readonly": false, |
| 2516 | "value": null, |
| 2517 | "assert": null, |
| 2518 | "flexible": false, |
| 2519 | "overwrite": false, |
| 2520 | "source": "migration_sql.rs:444" |
| 2521 | } |
| 2522 | }, |
| 2523 | "indexes": [ |
| 2524 | { |
| 2525 | "name": "session_attendance_session_user", |
| 2526 | "fields": [ |
| 2527 | "session", |
| 2528 | "user" |
| 2529 | ], |
| 2530 | "unique": true, |
| 2531 | "source": "migration_sql.rs:445" |
| 2532 | }, |
| 2533 | { |
| 2534 | "name": "session_attendance_session", |
| 2535 | "fields": [ |
| 2536 | "session" |
| 2537 | ], |
| 2538 | "unique": false, |
| 2539 | "source": "migration_sql.rs:446" |
| 2540 | }, |
| 2541 | { |
| 2542 | "name": "session_attendance_user", |
| 2543 | "fields": [ |
| 2544 | "user" |
| 2545 | ], |
| 2546 | "unique": false, |
| 2547 | "source": "migration_sql.rs:447" |
| 2548 | }, |
| 2549 | { |
| 2550 | "name": "session_attendance_course", |
| 2551 | "fields": [ |
| 2552 | "course" |
| 2553 | ], |
| 2554 | "unique": false, |
| 2555 | "source": "migration_sql.rs:448" |
| 2556 | } |
| 2557 | ] |
| 2558 | }, |
| 2559 | "work_entry": { |
| 2560 | "schemafull": true, |
| 2561 | "source": "migration_sql.rs:450", |
| 2562 | "fields": { |
| 2563 | "user": { |
| 2564 | "type": "record<user>", |
| 2565 | "optional": false, |
| 2566 | "default": null, |
| 2567 | "readonly": false, |
| 2568 | "value": null, |
| 2569 | "assert": null, |
| 2570 | "flexible": false, |
| 2571 | "overwrite": false, |
| 2572 | "source": "migration_sql.rs:451" |
| 2573 | }, |
| 2574 | "check_in": { |
| 2575 | "type": "int", |
| 2576 | "optional": false, |
| 2577 | "default": null, |
| 2578 | "readonly": false, |
| 2579 | "value": null, |
| 2580 | "assert": null, |
| 2581 | "flexible": false, |
| 2582 | "overwrite": false, |
| 2583 | "source": "migration_sql.rs:452" |
| 2584 | }, |
| 2585 | "check_out": { |
| 2586 | "type": "option<int>", |
| 2587 | "optional": true, |
| 2588 | "default": null, |
| 2589 | "readonly": false, |
| 2590 | "value": null, |
| 2591 | "assert": null, |
| 2592 | "flexible": false, |
| 2593 | "overwrite": false, |
| 2594 | "source": "migration_sql.rs:453" |
| 2595 | } |
| 2596 | }, |
| 2597 | "indexes": [ |
| 2598 | { |
| 2599 | "name": "work_entry_user", |
| 2600 | "fields": [ |
| 2601 | "user" |
| 2602 | ], |
| 2603 | "unique": false, |
| 2604 | "source": "migration_sql.rs:454" |
| 2605 | } |
| 2606 | ] |
| 2607 | }, |
| 2608 | "pomodoro_session": { |
| 2609 | "schemafull": true, |
| 2610 | "source": "migration_sql.rs:456", |
| 2611 | "fields": { |
| 2612 | "user": { |
| 2613 | "type": "record<user>", |
| 2614 | "optional": false, |
| 2615 | "default": null, |
| 2616 | "readonly": false, |
| 2617 | "value": null, |
| 2618 | "assert": null, |
| 2619 | "flexible": false, |
| 2620 | "overwrite": false, |
| 2621 | "source": "migration_sql.rs:457" |
| 2622 | }, |
| 2623 | "started_at": { |
| 2624 | "type": "int", |
| 2625 | "optional": false, |
| 2626 | "default": null, |
| 2627 | "readonly": false, |
| 2628 | "value": null, |
| 2629 | "assert": null, |
| 2630 | "flexible": false, |
| 2631 | "overwrite": false, |
| 2632 | "source": "migration_sql.rs:458" |
| 2633 | }, |
| 2634 | "finished_at": { |
| 2635 | "type": "option<int>", |
| 2636 | "optional": true, |
| 2637 | "default": null, |
| 2638 | "readonly": false, |
| 2639 | "value": null, |
| 2640 | "assert": null, |
| 2641 | "flexible": false, |
| 2642 | "overwrite": false, |
| 2643 | "source": "migration_sql.rs:459" |
| 2644 | }, |
| 2645 | "counted": { |
| 2646 | "type": "option<bool>", |
| 2647 | "optional": true, |
| 2648 | "default": null, |
| 2649 | "readonly": false, |
| 2650 | "value": null, |
| 2651 | "assert": null, |
| 2652 | "flexible": false, |
| 2653 | "overwrite": false, |
| 2654 | "source": "migration_sql.rs:464" |
| 2655 | } |
| 2656 | }, |
| 2657 | "indexes": [ |
| 2658 | { |
| 2659 | "name": "pomodoro_session_user", |
| 2660 | "fields": [ |
| 2661 | "user" |
| 2662 | ], |
| 2663 | "unique": false, |
| 2664 | "source": "migration_sql.rs:465" |
| 2665 | } |
| 2666 | ] |
| 2667 | }, |
| 2668 | "exam": { |
| 2669 | "schemafull": true, |
| 2670 | "source": "migration_sql.rs:467", |
| 2671 | "fields": { |
| 2672 | "creator": { |
| 2673 | "type": "record<user>", |
| 2674 | "optional": false, |
| 2675 | "default": null, |
| 2676 | "readonly": false, |
| 2677 | "value": null, |
| 2678 | "assert": null, |
| 2679 | "flexible": false, |
| 2680 | "overwrite": false, |
| 2681 | "source": "migration_sql.rs:468" |
| 2682 | }, |
| 2683 | "course": { |
| 2684 | "type": "record<course>", |
| 2685 | "optional": false, |
| 2686 | "default": null, |
| 2687 | "readonly": false, |
| 2688 | "value": null, |
| 2689 | "assert": null, |
| 2690 | "flexible": false, |
| 2691 | "overwrite": false, |
| 2692 | "source": "migration_sql.rs:469" |
| 2693 | }, |
| 2694 | "title": { |
| 2695 | "type": "string", |
| 2696 | "optional": false, |
| 2697 | "default": null, |
| 2698 | "readonly": false, |
| 2699 | "value": null, |
| 2700 | "assert": null, |
| 2701 | "flexible": false, |
| 2702 | "overwrite": false, |
| 2703 | "source": "migration_sql.rs:470" |
| 2704 | }, |
| 2705 | "description": { |
| 2706 | "type": "string", |
| 2707 | "optional": false, |
| 2708 | "default": null, |
| 2709 | "readonly": false, |
| 2710 | "value": null, |
| 2711 | "assert": null, |
| 2712 | "flexible": false, |
| 2713 | "overwrite": false, |
| 2714 | "source": "migration_sql.rs:471" |
| 2715 | }, |
| 2716 | "kind": { |
| 2717 | "type": "string", |
| 2718 | "optional": false, |
| 2719 | "default": null, |
| 2720 | "readonly": false, |
| 2721 | "value": null, |
| 2722 | "assert": null, |
| 2723 | "flexible": false, |
| 2724 | "overwrite": false, |
| 2725 | "source": "migration_sql.rs:472" |
| 2726 | }, |
| 2727 | "mode": { |
| 2728 | "type": "option<string>", |
| 2729 | "optional": true, |
| 2730 | "default": null, |
| 2731 | "readonly": false, |
| 2732 | "value": null, |
| 2733 | "assert": null, |
| 2734 | "flexible": false, |
| 2735 | "overwrite": false, |
| 2736 | "source": "migration_sql.rs:473" |
| 2737 | }, |
| 2738 | "starts_at": { |
| 2739 | "type": "option<int>", |
| 2740 | "optional": true, |
| 2741 | "default": null, |
| 2742 | "readonly": false, |
| 2743 | "value": null, |
| 2744 | "assert": null, |
| 2745 | "flexible": false, |
| 2746 | "overwrite": false, |
| 2747 | "source": "migration_sql.rs:474" |
| 2748 | }, |
| 2749 | "ends_at": { |
| 2750 | "type": "option<int>", |
| 2751 | "optional": true, |
| 2752 | "default": null, |
| 2753 | "readonly": false, |
| 2754 | "value": null, |
| 2755 | "assert": null, |
| 2756 | "flexible": false, |
| 2757 | "overwrite": false, |
| 2758 | "source": "migration_sql.rs:475" |
| 2759 | }, |
| 2760 | "duration_ms": { |
| 2761 | "type": "option<int>", |
| 2762 | "optional": true, |
| 2763 | "default": null, |
| 2764 | "readonly": false, |
| 2765 | "value": null, |
| 2766 | "assert": null, |
| 2767 | "flexible": false, |
| 2768 | "overwrite": false, |
| 2769 | "source": "migration_sql.rs:476" |
| 2770 | }, |
| 2771 | "max_attempts": { |
| 2772 | "type": "int", |
| 2773 | "optional": false, |
| 2774 | "default": "1", |
| 2775 | "readonly": false, |
| 2776 | "value": null, |
| 2777 | "assert": null, |
| 2778 | "flexible": false, |
| 2779 | "overwrite": false, |
| 2780 | "source": "migration_sql.rs:477" |
| 2781 | }, |
| 2782 | "allow_rejoin": { |
| 2783 | "type": "bool", |
| 2784 | "optional": false, |
| 2785 | "default": "true", |
| 2786 | "readonly": false, |
| 2787 | "value": null, |
| 2788 | "assert": null, |
| 2789 | "flexible": false, |
| 2790 | "overwrite": false, |
| 2791 | "source": "migration_sql.rs:478" |
| 2792 | }, |
| 2793 | "allow_review": { |
| 2794 | "type": "bool", |
| 2795 | "optional": false, |
| 2796 | "default": "false", |
| 2797 | "readonly": false, |
| 2798 | "value": null, |
| 2799 | "assert": null, |
| 2800 | "flexible": false, |
| 2801 | "overwrite": false, |
| 2802 | "source": "migration_sql.rs:479" |
| 2803 | }, |
| 2804 | "draft": { |
| 2805 | "type": "bool", |
| 2806 | "optional": false, |
| 2807 | "default": "false", |
| 2808 | "readonly": false, |
| 2809 | "value": null, |
| 2810 | "assert": null, |
| 2811 | "flexible": false, |
| 2812 | "overwrite": false, |
| 2813 | "source": "migration_sql.rs:480" |
| 2814 | }, |
| 2815 | "result_count": { |
| 2816 | "type": "option<int>", |
| 2817 | "optional": true, |
| 2818 | "default": null, |
| 2819 | "readonly": false, |
| 2820 | "value": null, |
| 2821 | "assert": null, |
| 2822 | "flexible": false, |
| 2823 | "overwrite": false, |
| 2824 | "source": "migration_sql.rs:484" |
| 2825 | } |
| 2826 | }, |
| 2827 | "indexes": [ |
| 2828 | { |
| 2829 | "name": "exam_course", |
| 2830 | "fields": [ |
| 2831 | "course" |
| 2832 | ], |
| 2833 | "unique": false, |
| 2834 | "source": "migration_sql.rs:485" |
| 2835 | } |
| 2836 | ] |
| 2837 | }, |
| 2838 | "exam_attempt": { |
| 2839 | "schemafull": true, |
| 2840 | "source": "migration_sql.rs:487", |
| 2841 | "fields": { |
| 2842 | "exam": { |
| 2843 | "type": "record<exam>", |
| 2844 | "optional": false, |
| 2845 | "default": null, |
| 2846 | "readonly": false, |
| 2847 | "value": null, |
| 2848 | "assert": null, |
| 2849 | "flexible": false, |
| 2850 | "overwrite": false, |
| 2851 | "source": "migration_sql.rs:488" |
| 2852 | }, |
| 2853 | "user": { |
| 2854 | "type": "record<user>", |
| 2855 | "optional": false, |
| 2856 | "default": null, |
| 2857 | "readonly": false, |
| 2858 | "value": null, |
| 2859 | "assert": null, |
| 2860 | "flexible": false, |
| 2861 | "overwrite": false, |
| 2862 | "source": "migration_sql.rs:489" |
| 2863 | }, |
| 2864 | "seq": { |
| 2865 | "type": "int", |
| 2866 | "optional": false, |
| 2867 | "default": "1", |
| 2868 | "readonly": false, |
| 2869 | "value": null, |
| 2870 | "assert": null, |
| 2871 | "flexible": false, |
| 2872 | "overwrite": false, |
| 2873 | "source": "migration_sql.rs:490" |
| 2874 | }, |
| 2875 | "started_at": { |
| 2876 | "type": "int", |
| 2877 | "optional": false, |
| 2878 | "default": null, |
| 2879 | "readonly": false, |
| 2880 | "value": null, |
| 2881 | "assert": null, |
| 2882 | "flexible": false, |
| 2883 | "overwrite": false, |
| 2884 | "source": "migration_sql.rs:491" |
| 2885 | }, |
| 2886 | "finished_at": { |
| 2887 | "type": "option<int>", |
| 2888 | "optional": true, |
| 2889 | "default": null, |
| 2890 | "readonly": false, |
| 2891 | "value": null, |
| 2892 | "assert": null, |
| 2893 | "flexible": false, |
| 2894 | "overwrite": false, |
| 2895 | "source": "migration_sql.rs:492" |
| 2896 | }, |
| 2897 | "left_at": { |
| 2898 | "type": "option<int>", |
| 2899 | "optional": true, |
| 2900 | "default": null, |
| 2901 | "readonly": false, |
| 2902 | "value": null, |
| 2903 | "assert": null, |
| 2904 | "flexible": false, |
| 2905 | "overwrite": false, |
| 2906 | "source": "migration_sql.rs:493" |
| 2907 | } |
| 2908 | }, |
| 2909 | "indexes": [ |
| 2910 | { |
| 2911 | "name": "exam_attempt_exam_user_seq", |
| 2912 | "fields": [ |
| 2913 | "exam", |
| 2914 | "user", |
| 2915 | "seq" |
| 2916 | ], |
| 2917 | "unique": true, |
| 2918 | "source": "migration_sql.rs:494" |
| 2919 | }, |
| 2920 | { |
| 2921 | "name": "exam_attempt_exam", |
| 2922 | "fields": [ |
| 2923 | "exam" |
| 2924 | ], |
| 2925 | "unique": false, |
| 2926 | "source": "migration_sql.rs:495" |
| 2927 | } |
| 2928 | ] |
| 2929 | }, |
| 2930 | "exam_question": { |
| 2931 | "schemafull": true, |
| 2932 | "source": "migration_sql.rs:497", |
| 2933 | "fields": { |
| 2934 | "exam": { |
| 2935 | "type": "record<exam>", |
| 2936 | "optional": false, |
| 2937 | "default": null, |
| 2938 | "readonly": false, |
| 2939 | "value": null, |
| 2940 | "assert": null, |
| 2941 | "flexible": false, |
| 2942 | "overwrite": false, |
| 2943 | "source": "migration_sql.rs:498" |
| 2944 | }, |
| 2945 | "text": { |
| 2946 | "type": "string", |
| 2947 | "optional": false, |
| 2948 | "default": null, |
| 2949 | "readonly": false, |
| 2950 | "value": null, |
| 2951 | "assert": null, |
| 2952 | "flexible": false, |
| 2953 | "overwrite": false, |
| 2954 | "source": "migration_sql.rs:499" |
| 2955 | }, |
| 2956 | "kind": { |
| 2957 | "type": "string", |
| 2958 | "optional": false, |
| 2959 | "default": null, |
| 2960 | "readonly": false, |
| 2961 | "value": null, |
| 2962 | "assert": null, |
| 2963 | "flexible": false, |
| 2964 | "overwrite": false, |
| 2965 | "source": "migration_sql.rs:500" |
| 2966 | }, |
| 2967 | "points": { |
| 2968 | "type": "int", |
| 2969 | "optional": false, |
| 2970 | "default": null, |
| 2971 | "readonly": false, |
| 2972 | "value": null, |
| 2973 | "assert": null, |
| 2974 | "flexible": false, |
| 2975 | "overwrite": false, |
| 2976 | "source": "migration_sql.rs:501" |
| 2977 | }, |
| 2978 | "choices": { |
| 2979 | "type": "option<array<object>>", |
| 2980 | "optional": true, |
| 2981 | "default": null, |
| 2982 | "readonly": false, |
| 2983 | "value": null, |
| 2984 | "assert": null, |
| 2985 | "flexible": false, |
| 2986 | "overwrite": true, |
| 2987 | "source": "migration_sql.rs:505" |
| 2988 | }, |
| 2989 | "choices.*.id": { |
| 2990 | "type": "string", |
| 2991 | "optional": false, |
| 2992 | "default": null, |
| 2993 | "readonly": false, |
| 2994 | "value": null, |
| 2995 | "assert": null, |
| 2996 | "flexible": false, |
| 2997 | "overwrite": true, |
| 2998 | "source": "migration_sql.rs:508" |
| 2999 | }, |
| 3000 | "choices.*.text": { |
| 3001 | "type": "string", |
| 3002 | "optional": false, |
| 3003 | "default": null, |
| 3004 | "readonly": false, |
| 3005 | "value": null, |
| 3006 | "assert": null, |
| 3007 | "flexible": false, |
| 3008 | "overwrite": true, |
| 3009 | "source": "migration_sql.rs:509" |
| 3010 | }, |
| 3011 | "correct": { |
| 3012 | "type": "option<string>", |
| 3013 | "optional": true, |
| 3014 | "default": null, |
| 3015 | "readonly": false, |
| 3016 | "value": null, |
| 3017 | "assert": null, |
| 3018 | "flexible": false, |
| 3019 | "overwrite": true, |
| 3020 | "source": "migration_sql.rs:510" |
| 3021 | }, |
| 3022 | "subject": { |
| 3023 | "type": "record<subject>", |
| 3024 | "optional": false, |
| 3025 | "default": null, |
| 3026 | "readonly": false, |
| 3027 | "value": null, |
| 3028 | "assert": null, |
| 3029 | "flexible": false, |
| 3030 | "overwrite": false, |
| 3031 | "source": "migration_sql.rs:511" |
| 3032 | }, |
| 3033 | "from_bank": { |
| 3034 | "type": "option<record<bank_question>>", |
| 3035 | "optional": true, |
| 3036 | "default": null, |
| 3037 | "readonly": false, |
| 3038 | "value": null, |
| 3039 | "assert": null, |
| 3040 | "flexible": false, |
| 3041 | "overwrite": true, |
| 3042 | "source": "migration_sql.rs:519" |
| 3043 | }, |
| 3044 | "banked_as": { |
| 3045 | "type": "option<record<bank_question>>", |
| 3046 | "optional": true, |
| 3047 | "default": null, |
| 3048 | "readonly": false, |
| 3049 | "value": null, |
| 3050 | "assert": null, |
| 3051 | "flexible": false, |
| 3052 | "overwrite": true, |
| 3053 | "source": "migration_sql.rs:520" |
| 3054 | } |
| 3055 | }, |
| 3056 | "indexes": [ |
| 3057 | { |
| 3058 | "name": "exam_question_exam", |
| 3059 | "fields": [ |
| 3060 | "exam" |
| 3061 | ], |
| 3062 | "unique": false, |
| 3063 | "source": "migration_sql.rs:522" |
| 3064 | }, |
| 3065 | { |
| 3066 | "name": "exam_question_subject", |
| 3067 | "fields": [ |
| 3068 | "subject" |
| 3069 | ], |
| 3070 | "unique": false, |
| 3071 | "source": "migration_sql.rs:523" |
| 3072 | } |
| 3073 | ], |
| 3074 | "removed_fields": [ |
| 3075 | { |
| 3076 | "field": "source_bank", |
| 3077 | "source": "migration_sql.rs:521" |
| 3078 | } |
| 3079 | ] |
| 3080 | }, |
| 3081 | "question_image": { |
| 3082 | "schemafull": true, |
| 3083 | "source": "migration_sql.rs:525", |
| 3084 | "fields": { |
| 3085 | "exam": { |
| 3086 | "type": "record<exam>", |
| 3087 | "optional": false, |
| 3088 | "default": null, |
| 3089 | "readonly": false, |
| 3090 | "value": null, |
| 3091 | "assert": null, |
| 3092 | "flexible": false, |
| 3093 | "overwrite": false, |
| 3094 | "source": "migration_sql.rs:526" |
| 3095 | }, |
| 3096 | "question": { |
| 3097 | "type": "record<exam_question>", |
| 3098 | "optional": false, |
| 3099 | "default": null, |
| 3100 | "readonly": false, |
| 3101 | "value": null, |
| 3102 | "assert": null, |
| 3103 | "flexible": false, |
| 3104 | "overwrite": false, |
| 3105 | "source": "migration_sql.rs:527" |
| 3106 | }, |
| 3107 | "slot": { |
| 3108 | "type": "option<string>", |
| 3109 | "optional": true, |
| 3110 | "default": null, |
| 3111 | "readonly": false, |
| 3112 | "value": null, |
| 3113 | "assert": null, |
| 3114 | "flexible": false, |
| 3115 | "overwrite": true, |
| 3116 | "source": "migration_sql.rs:529" |
| 3117 | }, |
| 3118 | "file": { |
| 3119 | "type": "string", |
| 3120 | "optional": false, |
| 3121 | "default": null, |
| 3122 | "readonly": false, |
| 3123 | "value": null, |
| 3124 | "assert": null, |
| 3125 | "flexible": false, |
| 3126 | "overwrite": false, |
| 3127 | "source": "migration_sql.rs:530" |
| 3128 | }, |
| 3129 | "content_type": { |
| 3130 | "type": "string", |
| 3131 | "optional": false, |
| 3132 | "default": null, |
| 3133 | "readonly": false, |
| 3134 | "value": null, |
| 3135 | "assert": null, |
| 3136 | "flexible": false, |
| 3137 | "overwrite": false, |
| 3138 | "source": "migration_sql.rs:531" |
| 3139 | }, |
| 3140 | "size": { |
| 3141 | "type": "int", |
| 3142 | "optional": false, |
| 3143 | "default": null, |
| 3144 | "readonly": false, |
| 3145 | "value": null, |
| 3146 | "assert": null, |
| 3147 | "flexible": false, |
| 3148 | "overwrite": false, |
| 3149 | "source": "migration_sql.rs:532" |
| 3150 | } |
| 3151 | }, |
| 3152 | "indexes": [ |
| 3153 | { |
| 3154 | "name": "question_image_exam", |
| 3155 | "fields": [ |
| 3156 | "exam" |
| 3157 | ], |
| 3158 | "unique": false, |
| 3159 | "source": "migration_sql.rs:533" |
| 3160 | }, |
| 3161 | { |
| 3162 | "name": "question_image_question", |
| 3163 | "fields": [ |
| 3164 | "question" |
| 3165 | ], |
| 3166 | "unique": false, |
| 3167 | "source": "migration_sql.rs:534" |
| 3168 | } |
| 3169 | ] |
| 3170 | }, |
| 3171 | "bank_question": { |
| 3172 | "schemafull": true, |
| 3173 | "source": "migration_sql.rs:536", |
| 3174 | "fields": { |
| 3175 | "owner": { |
| 3176 | "type": "record<user>", |
| 3177 | "optional": false, |
| 3178 | "default": null, |
| 3179 | "readonly": false, |
| 3180 | "value": null, |
| 3181 | "assert": null, |
| 3182 | "flexible": false, |
| 3183 | "overwrite": false, |
| 3184 | "source": "migration_sql.rs:537" |
| 3185 | }, |
| 3186 | "subject": { |
| 3187 | "type": "option<record<subject>>", |
| 3188 | "optional": true, |
| 3189 | "default": null, |
| 3190 | "readonly": false, |
| 3191 | "value": null, |
| 3192 | "assert": null, |
| 3193 | "flexible": false, |
| 3194 | "overwrite": true, |
| 3195 | "source": "migration_sql.rs:541" |
| 3196 | }, |
| 3197 | "text": { |
| 3198 | "type": "string", |
| 3199 | "optional": false, |
| 3200 | "default": null, |
| 3201 | "readonly": false, |
| 3202 | "value": null, |
| 3203 | "assert": null, |
| 3204 | "flexible": false, |
| 3205 | "overwrite": false, |
| 3206 | "source": "migration_sql.rs:542" |
| 3207 | }, |
| 3208 | "kind": { |
| 3209 | "type": "string", |
| 3210 | "optional": false, |
| 3211 | "default": null, |
| 3212 | "readonly": false, |
| 3213 | "value": null, |
| 3214 | "assert": null, |
| 3215 | "flexible": false, |
| 3216 | "overwrite": false, |
| 3217 | "source": "migration_sql.rs:543" |
| 3218 | }, |
| 3219 | "points": { |
| 3220 | "type": "int", |
| 3221 | "optional": false, |
| 3222 | "default": null, |
| 3223 | "readonly": false, |
| 3224 | "value": null, |
| 3225 | "assert": null, |
| 3226 | "flexible": false, |
| 3227 | "overwrite": false, |
| 3228 | "source": "migration_sql.rs:544" |
| 3229 | }, |
| 3230 | "choices": { |
| 3231 | "type": "option<array<object>>", |
| 3232 | "optional": true, |
| 3233 | "default": null, |
| 3234 | "readonly": false, |
| 3235 | "value": null, |
| 3236 | "assert": null, |
| 3237 | "flexible": false, |
| 3238 | "overwrite": true, |
| 3239 | "source": "migration_sql.rs:548" |
| 3240 | }, |
| 3241 | "choices.*.id": { |
| 3242 | "type": "string", |
| 3243 | "optional": false, |
| 3244 | "default": null, |
| 3245 | "readonly": false, |
| 3246 | "value": null, |
| 3247 | "assert": null, |
| 3248 | "flexible": false, |
| 3249 | "overwrite": true, |
| 3250 | "source": "migration_sql.rs:551" |
| 3251 | }, |
| 3252 | "choices.*.text": { |
| 3253 | "type": "string", |
| 3254 | "optional": false, |
| 3255 | "default": null, |
| 3256 | "readonly": false, |
| 3257 | "value": null, |
| 3258 | "assert": null, |
| 3259 | "flexible": false, |
| 3260 | "overwrite": true, |
| 3261 | "source": "migration_sql.rs:552" |
| 3262 | }, |
| 3263 | "correct": { |
| 3264 | "type": "option<string>", |
| 3265 | "optional": true, |
| 3266 | "default": null, |
| 3267 | "readonly": false, |
| 3268 | "value": null, |
| 3269 | "assert": null, |
| 3270 | "flexible": false, |
| 3271 | "overwrite": true, |
| 3272 | "source": "migration_sql.rs:553" |
| 3273 | }, |
| 3274 | "source_exam": { |
| 3275 | "type": "option<record<exam>>", |
| 3276 | "optional": true, |
| 3277 | "default": null, |
| 3278 | "readonly": false, |
| 3279 | "value": null, |
| 3280 | "assert": null, |
| 3281 | "flexible": false, |
| 3282 | "overwrite": false, |
| 3283 | "source": "migration_sql.rs:554" |
| 3284 | }, |
| 3285 | "visibility": { |
| 3286 | "type": "string", |
| 3287 | "optional": false, |
| 3288 | "default": "'private'", |
| 3289 | "readonly": false, |
| 3290 | "value": null, |
| 3291 | "assert": null, |
| 3292 | "flexible": false, |
| 3293 | "overwrite": false, |
| 3294 | "source": "migration_sql.rs:558" |
| 3295 | }, |
| 3296 | "created_at": { |
| 3297 | "type": "int", |
| 3298 | "optional": false, |
| 3299 | "default": null, |
| 3300 | "readonly": true, |
| 3301 | "value": null, |
| 3302 | "assert": null, |
| 3303 | "flexible": false, |
| 3304 | "overwrite": false, |
| 3305 | "source": "migration_sql.rs:559" |
| 3306 | } |
| 3307 | }, |
| 3308 | "indexes": [ |
| 3309 | { |
| 3310 | "name": "bank_question_owner", |
| 3311 | "fields": [ |
| 3312 | "owner" |
| 3313 | ], |
| 3314 | "unique": false, |
| 3315 | "source": "migration_sql.rs:560" |
| 3316 | }, |
| 3317 | { |
| 3318 | "name": "bank_question_subject", |
| 3319 | "fields": [ |
| 3320 | "subject" |
| 3321 | ], |
| 3322 | "unique": false, |
| 3323 | "source": "migration_sql.rs:561" |
| 3324 | } |
| 3325 | ] |
| 3326 | }, |
| 3327 | "bank_question_image": { |
| 3328 | "schemafull": true, |
| 3329 | "source": "migration_sql.rs:563", |
| 3330 | "fields": { |
| 3331 | "bank_question": { |
| 3332 | "type": "record<bank_question>", |
| 3333 | "optional": false, |
| 3334 | "default": null, |
| 3335 | "readonly": false, |
| 3336 | "value": null, |
| 3337 | "assert": null, |
| 3338 | "flexible": false, |
| 3339 | "overwrite": false, |
| 3340 | "source": "migration_sql.rs:564" |
| 3341 | }, |
| 3342 | "slot": { |
| 3343 | "type": "option<string>", |
| 3344 | "optional": true, |
| 3345 | "default": null, |
| 3346 | "readonly": false, |
| 3347 | "value": null, |
| 3348 | "assert": null, |
| 3349 | "flexible": false, |
| 3350 | "overwrite": true, |
| 3351 | "source": "migration_sql.rs:566" |
| 3352 | }, |
| 3353 | "file": { |
| 3354 | "type": "string", |
| 3355 | "optional": false, |
| 3356 | "default": null, |
| 3357 | "readonly": false, |
| 3358 | "value": null, |
| 3359 | "assert": null, |
| 3360 | "flexible": false, |
| 3361 | "overwrite": false, |
| 3362 | "source": "migration_sql.rs:567" |
| 3363 | }, |
| 3364 | "content_type": { |
| 3365 | "type": "string", |
| 3366 | "optional": false, |
| 3367 | "default": null, |
| 3368 | "readonly": false, |
| 3369 | "value": null, |
| 3370 | "assert": null, |
| 3371 | "flexible": false, |
| 3372 | "overwrite": false, |
| 3373 | "source": "migration_sql.rs:568" |
| 3374 | }, |
| 3375 | "size": { |
| 3376 | "type": "int", |
| 3377 | "optional": false, |
| 3378 | "default": null, |
| 3379 | "readonly": false, |
| 3380 | "value": null, |
| 3381 | "assert": null, |
| 3382 | "flexible": false, |
| 3383 | "overwrite": false, |
| 3384 | "source": "migration_sql.rs:569" |
| 3385 | } |
| 3386 | }, |
| 3387 | "indexes": [ |
| 3388 | { |
| 3389 | "name": "bank_question_image_question", |
| 3390 | "fields": [ |
| 3391 | "bank_question" |
| 3392 | ], |
| 3393 | "unique": false, |
| 3394 | "source": "migration_sql.rs:570" |
| 3395 | } |
| 3396 | ] |
| 3397 | }, |
| 3398 | "exam_answer": { |
| 3399 | "schemafull": true, |
| 3400 | "source": "migration_sql.rs:572", |
| 3401 | "fields": { |
| 3402 | "exam": { |
| 3403 | "type": "record<exam>", |
| 3404 | "optional": false, |
| 3405 | "default": null, |
| 3406 | "readonly": false, |
| 3407 | "value": null, |
| 3408 | "assert": null, |
| 3409 | "flexible": false, |
| 3410 | "overwrite": false, |
| 3411 | "source": "migration_sql.rs:573" |
| 3412 | }, |
| 3413 | "question": { |
| 3414 | "type": "record<exam_question>", |
| 3415 | "optional": false, |
| 3416 | "default": null, |
| 3417 | "readonly": false, |
| 3418 | "value": null, |
| 3419 | "assert": null, |
| 3420 | "flexible": false, |
| 3421 | "overwrite": false, |
| 3422 | "source": "migration_sql.rs:574" |
| 3423 | }, |
| 3424 | "user": { |
| 3425 | "type": "record<user>", |
| 3426 | "optional": false, |
| 3427 | "default": null, |
| 3428 | "readonly": false, |
| 3429 | "value": null, |
| 3430 | "assert": null, |
| 3431 | "flexible": false, |
| 3432 | "overwrite": false, |
| 3433 | "source": "migration_sql.rs:575" |
| 3434 | }, |
| 3435 | "selected": { |
| 3436 | "type": "option<string>", |
| 3437 | "optional": true, |
| 3438 | "default": null, |
| 3439 | "readonly": false, |
| 3440 | "value": null, |
| 3441 | "assert": null, |
| 3442 | "flexible": false, |
| 3443 | "overwrite": true, |
| 3444 | "source": "migration_sql.rs:577" |
| 3445 | }, |
| 3446 | "text": { |
| 3447 | "type": "option<string>", |
| 3448 | "optional": true, |
| 3449 | "default": null, |
| 3450 | "readonly": false, |
| 3451 | "value": null, |
| 3452 | "assert": null, |
| 3453 | "flexible": false, |
| 3454 | "overwrite": false, |
| 3455 | "source": "migration_sql.rs:578" |
| 3456 | }, |
| 3457 | "updated_at": { |
| 3458 | "type": "int", |
| 3459 | "optional": false, |
| 3460 | "default": null, |
| 3461 | "readonly": false, |
| 3462 | "value": null, |
| 3463 | "assert": null, |
| 3464 | "flexible": false, |
| 3465 | "overwrite": false, |
| 3466 | "source": "migration_sql.rs:579" |
| 3467 | }, |
| 3468 | "seq": { |
| 3469 | "type": "int", |
| 3470 | "optional": false, |
| 3471 | "default": "1", |
| 3472 | "readonly": false, |
| 3473 | "value": null, |
| 3474 | "assert": null, |
| 3475 | "flexible": false, |
| 3476 | "overwrite": false, |
| 3477 | "source": "migration_sql.rs:583" |
| 3478 | } |
| 3479 | }, |
| 3480 | "indexes": [ |
| 3481 | { |
| 3482 | "name": "exam_answer_question_user_seq", |
| 3483 | "fields": [ |
| 3484 | "question", |
| 3485 | "user", |
| 3486 | "seq" |
| 3487 | ], |
| 3488 | "unique": true, |
| 3489 | "source": "migration_sql.rs:587" |
| 3490 | }, |
| 3491 | { |
| 3492 | "name": "exam_answer_exam_user", |
| 3493 | "fields": [ |
| 3494 | "exam", |
| 3495 | "user" |
| 3496 | ], |
| 3497 | "unique": false, |
| 3498 | "source": "migration_sql.rs:588" |
| 3499 | }, |
| 3500 | { |
| 3501 | "name": "exam_answer_exam", |
| 3502 | "fields": [ |
| 3503 | "exam" |
| 3504 | ], |
| 3505 | "unique": false, |
| 3506 | "source": "migration_sql.rs:589" |
| 3507 | } |
| 3508 | ], |
| 3509 | "removed_indexes": [ |
| 3510 | { |
| 3511 | "index": "exam_answer_question_user", |
| 3512 | "source": "migration_sql.rs:586" |
| 3513 | } |
| 3514 | ] |
| 3515 | }, |
| 3516 | "answer_image": { |
| 3517 | "schemafull": true, |
| 3518 | "source": "migration_sql.rs:591", |
| 3519 | "fields": { |
| 3520 | "exam": { |
| 3521 | "type": "record<exam>", |
| 3522 | "optional": false, |
| 3523 | "default": null, |
| 3524 | "readonly": false, |
| 3525 | "value": null, |
| 3526 | "assert": null, |
| 3527 | "flexible": false, |
| 3528 | "overwrite": false, |
| 3529 | "source": "migration_sql.rs:592" |
| 3530 | }, |
| 3531 | "question": { |
| 3532 | "type": "record<exam_question>", |
| 3533 | "optional": false, |
| 3534 | "default": null, |
| 3535 | "readonly": false, |
| 3536 | "value": null, |
| 3537 | "assert": null, |
| 3538 | "flexible": false, |
| 3539 | "overwrite": false, |
| 3540 | "source": "migration_sql.rs:593" |
| 3541 | }, |
| 3542 | "user": { |
| 3543 | "type": "record<user>", |
| 3544 | "optional": false, |
| 3545 | "default": null, |
| 3546 | "readonly": false, |
| 3547 | "value": null, |
| 3548 | "assert": null, |
| 3549 | "flexible": false, |
| 3550 | "overwrite": false, |
| 3551 | "source": "migration_sql.rs:594" |
| 3552 | }, |
| 3553 | "file": { |
| 3554 | "type": "string", |
| 3555 | "optional": false, |
| 3556 | "default": null, |
| 3557 | "readonly": false, |
| 3558 | "value": null, |
| 3559 | "assert": null, |
| 3560 | "flexible": false, |
| 3561 | "overwrite": false, |
| 3562 | "source": "migration_sql.rs:595" |
| 3563 | }, |
| 3564 | "content_type": { |
| 3565 | "type": "string", |
| 3566 | "optional": false, |
| 3567 | "default": null, |
| 3568 | "readonly": false, |
| 3569 | "value": null, |
| 3570 | "assert": null, |
| 3571 | "flexible": false, |
| 3572 | "overwrite": false, |
| 3573 | "source": "migration_sql.rs:596" |
| 3574 | }, |
| 3575 | "size": { |
| 3576 | "type": "int", |
| 3577 | "optional": false, |
| 3578 | "default": null, |
| 3579 | "readonly": false, |
| 3580 | "value": null, |
| 3581 | "assert": null, |
| 3582 | "flexible": false, |
| 3583 | "overwrite": false, |
| 3584 | "source": "migration_sql.rs:597" |
| 3585 | }, |
| 3586 | "seq": { |
| 3587 | "type": "int", |
| 3588 | "optional": false, |
| 3589 | "default": "1", |
| 3590 | "readonly": false, |
| 3591 | "value": null, |
| 3592 | "assert": null, |
| 3593 | "flexible": false, |
| 3594 | "overwrite": false, |
| 3595 | "source": "migration_sql.rs:600" |
| 3596 | } |
| 3597 | }, |
| 3598 | "indexes": [ |
| 3599 | { |
| 3600 | "name": "answer_image_exam", |
| 3601 | "fields": [ |
| 3602 | "exam" |
| 3603 | ], |
| 3604 | "unique": false, |
| 3605 | "source": "migration_sql.rs:601" |
| 3606 | }, |
| 3607 | { |
| 3608 | "name": "answer_image_user", |
| 3609 | "fields": [ |
| 3610 | "user" |
| 3611 | ], |
| 3612 | "unique": false, |
| 3613 | "source": "migration_sql.rs:602" |
| 3614 | } |
| 3615 | ] |
| 3616 | }, |
| 3617 | "exam_result": { |
| 3618 | "schemafull": true, |
| 3619 | "source": "migration_sql.rs:604", |
| 3620 | "fields": { |
| 3621 | "exam": { |
| 3622 | "type": "record<exam>", |
| 3623 | "optional": false, |
| 3624 | "default": null, |
| 3625 | "readonly": false, |
| 3626 | "value": null, |
| 3627 | "assert": null, |
| 3628 | "flexible": false, |
| 3629 | "overwrite": false, |
| 3630 | "source": "migration_sql.rs:605" |
| 3631 | }, |
| 3632 | "user": { |
| 3633 | "type": "record<user>", |
| 3634 | "optional": false, |
| 3635 | "default": null, |
| 3636 | "readonly": false, |
| 3637 | "value": null, |
| 3638 | "assert": null, |
| 3639 | "flexible": false, |
| 3640 | "overwrite": false, |
| 3641 | "source": "migration_sql.rs:606" |
| 3642 | }, |
| 3643 | "mark": { |
| 3644 | "type": "int", |
| 3645 | "optional": false, |
| 3646 | "default": null, |
| 3647 | "readonly": false, |
| 3648 | "value": null, |
| 3649 | "assert": null, |
| 3650 | "flexible": false, |
| 3651 | "overwrite": false, |
| 3652 | "source": "migration_sql.rs:607" |
| 3653 | }, |
| 3654 | "graded_by": { |
| 3655 | "type": "record<user>", |
| 3656 | "optional": false, |
| 3657 | "default": null, |
| 3658 | "readonly": false, |
| 3659 | "value": null, |
| 3660 | "assert": null, |
| 3661 | "flexible": false, |
| 3662 | "overwrite": false, |
| 3663 | "source": "migration_sql.rs:608" |
| 3664 | }, |
| 3665 | "seq": { |
| 3666 | "type": "int", |
| 3667 | "optional": false, |
| 3668 | "default": "1", |
| 3669 | "readonly": false, |
| 3670 | "value": null, |
| 3671 | "assert": null, |
| 3672 | "flexible": false, |
| 3673 | "overwrite": false, |
| 3674 | "source": "migration_sql.rs:611" |
| 3675 | } |
| 3676 | }, |
| 3677 | "indexes": [ |
| 3678 | { |
| 3679 | "name": "exam_result_exam_user_seq", |
| 3680 | "fields": [ |
| 3681 | "exam", |
| 3682 | "user", |
| 3683 | "seq" |
| 3684 | ], |
| 3685 | "unique": true, |
| 3686 | "source": "migration_sql.rs:613" |
| 3687 | } |
| 3688 | ], |
| 3689 | "removed_indexes": [ |
| 3690 | { |
| 3691 | "index": "exam_result_exam_user", |
| 3692 | "source": "migration_sql.rs:612" |
| 3693 | } |
| 3694 | ] |
| 3695 | }, |
| 3696 | "pool_question": { |
| 3697 | "schemafull": true, |
| 3698 | "source": "migration_sql.rs:615", |
| 3699 | "fields": { |
| 3700 | "asker": { |
| 3701 | "type": "record<user>", |
| 3702 | "optional": false, |
| 3703 | "default": null, |
| 3704 | "readonly": false, |
| 3705 | "value": null, |
| 3706 | "assert": null, |
| 3707 | "flexible": false, |
| 3708 | "overwrite": false, |
| 3709 | "source": "migration_sql.rs:616" |
| 3710 | }, |
| 3711 | "title": { |
| 3712 | "type": "string", |
| 3713 | "optional": false, |
| 3714 | "default": null, |
| 3715 | "readonly": false, |
| 3716 | "value": null, |
| 3717 | "assert": null, |
| 3718 | "flexible": false, |
| 3719 | "overwrite": false, |
| 3720 | "source": "migration_sql.rs:617" |
| 3721 | }, |
| 3722 | "body": { |
| 3723 | "type": "string", |
| 3724 | "optional": false, |
| 3725 | "default": null, |
| 3726 | "readonly": false, |
| 3727 | "value": null, |
| 3728 | "assert": null, |
| 3729 | "flexible": false, |
| 3730 | "overwrite": false, |
| 3731 | "source": "migration_sql.rs:618" |
| 3732 | }, |
| 3733 | "status": { |
| 3734 | "type": "string", |
| 3735 | "optional": false, |
| 3736 | "default": "'pending'", |
| 3737 | "readonly": false, |
| 3738 | "value": null, |
| 3739 | "assert": null, |
| 3740 | "flexible": false, |
| 3741 | "overwrite": false, |
| 3742 | "source": "migration_sql.rs:619" |
| 3743 | }, |
| 3744 | "asked_at": { |
| 3745 | "type": "int", |
| 3746 | "optional": false, |
| 3747 | "default": null, |
| 3748 | "readonly": false, |
| 3749 | "value": null, |
| 3750 | "assert": null, |
| 3751 | "flexible": false, |
| 3752 | "overwrite": false, |
| 3753 | "source": "migration_sql.rs:620" |
| 3754 | }, |
| 3755 | "approved_by": { |
| 3756 | "type": "option<record<user>>", |
| 3757 | "optional": true, |
| 3758 | "default": null, |
| 3759 | "readonly": false, |
| 3760 | "value": null, |
| 3761 | "assert": null, |
| 3762 | "flexible": false, |
| 3763 | "overwrite": false, |
| 3764 | "source": "migration_sql.rs:621" |
| 3765 | }, |
| 3766 | "image_file": { |
| 3767 | "type": "option<string>", |
| 3768 | "optional": true, |
| 3769 | "default": null, |
| 3770 | "readonly": false, |
| 3771 | "value": null, |
| 3772 | "assert": null, |
| 3773 | "flexible": false, |
| 3774 | "overwrite": false, |
| 3775 | "source": "migration_sql.rs:622" |
| 3776 | }, |
| 3777 | "image_content_type": { |
| 3778 | "type": "option<string>", |
| 3779 | "optional": true, |
| 3780 | "default": null, |
| 3781 | "readonly": false, |
| 3782 | "value": null, |
| 3783 | "assert": null, |
| 3784 | "flexible": false, |
| 3785 | "overwrite": false, |
| 3786 | "source": "migration_sql.rs:623" |
| 3787 | }, |
| 3788 | "image_size": { |
| 3789 | "type": "option<int>", |
| 3790 | "optional": true, |
| 3791 | "default": null, |
| 3792 | "readonly": false, |
| 3793 | "value": null, |
| 3794 | "assert": null, |
| 3795 | "flexible": false, |
| 3796 | "overwrite": false, |
| 3797 | "source": "migration_sql.rs:624" |
| 3798 | } |
| 3799 | }, |
| 3800 | "indexes": [ |
| 3801 | { |
| 3802 | "name": "pool_question_status", |
| 3803 | "fields": [ |
| 3804 | "status" |
| 3805 | ], |
| 3806 | "unique": false, |
| 3807 | "source": "migration_sql.rs:625" |
| 3808 | }, |
| 3809 | { |
| 3810 | "name": "pool_question_asker", |
| 3811 | "fields": [ |
| 3812 | "asker" |
| 3813 | ], |
| 3814 | "unique": false, |
| 3815 | "source": "migration_sql.rs:626" |
| 3816 | } |
| 3817 | ] |
| 3818 | }, |
| 3819 | "solution": { |
| 3820 | "schemafull": true, |
| 3821 | "source": "migration_sql.rs:628", |
| 3822 | "fields": { |
| 3823 | "question": { |
| 3824 | "type": "record<pool_question>", |
| 3825 | "optional": false, |
| 3826 | "default": null, |
| 3827 | "readonly": false, |
| 3828 | "value": null, |
| 3829 | "assert": null, |
| 3830 | "flexible": false, |
| 3831 | "overwrite": false, |
| 3832 | "source": "migration_sql.rs:629" |
| 3833 | }, |
| 3834 | "author": { |
| 3835 | "type": "record<user>", |
| 3836 | "optional": false, |
| 3837 | "default": null, |
| 3838 | "readonly": false, |
| 3839 | "value": null, |
| 3840 | "assert": null, |
| 3841 | "flexible": false, |
| 3842 | "overwrite": false, |
| 3843 | "source": "migration_sql.rs:630" |
| 3844 | }, |
| 3845 | "body": { |
| 3846 | "type": "string", |
| 3847 | "optional": false, |
| 3848 | "default": null, |
| 3849 | "readonly": false, |
| 3850 | "value": null, |
| 3851 | "assert": null, |
| 3852 | "flexible": false, |
| 3853 | "overwrite": false, |
| 3854 | "source": "migration_sql.rs:631" |
| 3855 | }, |
| 3856 | "offered_at": { |
| 3857 | "type": "int", |
| 3858 | "optional": false, |
| 3859 | "default": null, |
| 3860 | "readonly": false, |
| 3861 | "value": null, |
| 3862 | "assert": null, |
| 3863 | "flexible": false, |
| 3864 | "overwrite": false, |
| 3865 | "source": "migration_sql.rs:632" |
| 3866 | }, |
| 3867 | "image_file": { |
| 3868 | "type": "option<string>", |
| 3869 | "optional": true, |
| 3870 | "default": null, |
| 3871 | "readonly": false, |
| 3872 | "value": null, |
| 3873 | "assert": null, |
| 3874 | "flexible": false, |
| 3875 | "overwrite": false, |
| 3876 | "source": "migration_sql.rs:633" |
| 3877 | }, |
| 3878 | "image_content_type": { |
| 3879 | "type": "option<string>", |
| 3880 | "optional": true, |
| 3881 | "default": null, |
| 3882 | "readonly": false, |
| 3883 | "value": null, |
| 3884 | "assert": null, |
| 3885 | "flexible": false, |
| 3886 | "overwrite": false, |
| 3887 | "source": "migration_sql.rs:634" |
| 3888 | }, |
| 3889 | "image_size": { |
| 3890 | "type": "option<int>", |
| 3891 | "optional": true, |
| 3892 | "default": null, |
| 3893 | "readonly": false, |
| 3894 | "value": null, |
| 3895 | "assert": null, |
| 3896 | "flexible": false, |
| 3897 | "overwrite": false, |
| 3898 | "source": "migration_sql.rs:635" |
| 3899 | } |
| 3900 | }, |
| 3901 | "indexes": [ |
| 3902 | { |
| 3903 | "name": "solution_question", |
| 3904 | "fields": [ |
| 3905 | "question" |
| 3906 | ], |
| 3907 | "unique": false, |
| 3908 | "source": "migration_sql.rs:636" |
| 3909 | } |
| 3910 | ] |
| 3911 | }, |
| 3912 | "settings": { |
| 3913 | "schemafull": true, |
| 3914 | "source": "migration_sql.rs:638", |
| 3915 | "fields": { |
| 3916 | "exam_kinds": { |
| 3917 | "type": "array<object>", |
| 3918 | "optional": false, |
| 3919 | "default": null, |
| 3920 | "readonly": false, |
| 3921 | "value": null, |
| 3922 | "assert": null, |
| 3923 | "flexible": false, |
| 3924 | "overwrite": false, |
| 3925 | "source": "migration_sql.rs:639" |
| 3926 | }, |
| 3927 | "exam_kinds.*.name": { |
| 3928 | "type": "string", |
| 3929 | "optional": false, |
| 3930 | "default": null, |
| 3931 | "readonly": false, |
| 3932 | "value": null, |
| 3933 | "assert": null, |
| 3934 | "flexible": false, |
| 3935 | "overwrite": false, |
| 3936 | "source": "migration_sql.rs:640" |
| 3937 | }, |
| 3938 | "exam_kinds.*.weight": { |
| 3939 | "type": "int", |
| 3940 | "optional": false, |
| 3941 | "default": null, |
| 3942 | "readonly": false, |
| 3943 | "value": null, |
| 3944 | "assert": null, |
| 3945 | "flexible": false, |
| 3946 | "overwrite": false, |
| 3947 | "source": "migration_sql.rs:641" |
| 3948 | }, |
| 3949 | "attendance_statuses": { |
| 3950 | "type": "array<string>", |
| 3951 | "optional": false, |
| 3952 | "default": null, |
| 3953 | "readonly": false, |
| 3954 | "value": null, |
| 3955 | "assert": null, |
| 3956 | "flexible": false, |
| 3957 | "overwrite": false, |
| 3958 | "source": "migration_sql.rs:642" |
| 3959 | }, |
| 3960 | "grade_bands": { |
| 3961 | "type": "array<object>", |
| 3962 | "optional": false, |
| 3963 | "default": null, |
| 3964 | "readonly": false, |
| 3965 | "value": null, |
| 3966 | "assert": null, |
| 3967 | "flexible": false, |
| 3968 | "overwrite": false, |
| 3969 | "source": "migration_sql.rs:643" |
| 3970 | }, |
| 3971 | "grade_bands.*.min": { |
| 3972 | "type": "int", |
| 3973 | "optional": false, |
| 3974 | "default": null, |
| 3975 | "readonly": false, |
| 3976 | "value": null, |
| 3977 | "assert": null, |
| 3978 | "flexible": false, |
| 3979 | "overwrite": false, |
| 3980 | "source": "migration_sql.rs:644" |
| 3981 | }, |
| 3982 | "grade_bands.*.label": { |
| 3983 | "type": "string", |
| 3984 | "optional": false, |
| 3985 | "default": null, |
| 3986 | "readonly": false, |
| 3987 | "value": null, |
| 3988 | "assert": null, |
| 3989 | "flexible": false, |
| 3990 | "overwrite": false, |
| 3991 | "source": "migration_sql.rs:645" |
| 3992 | }, |
| 3993 | "max_file_bytes": { |
| 3994 | "type": "option<int>", |
| 3995 | "optional": true, |
| 3996 | "default": null, |
| 3997 | "readonly": false, |
| 3998 | "value": null, |
| 3999 | "assert": null, |
| 4000 | "flexible": false, |
| 4001 | "overwrite": false, |
| 4002 | "source": "migration_sql.rs:646" |
| 4003 | }, |
| 4004 | "chatbot_history_turns": { |
| 4005 | "type": "option<int>", |
| 4006 | "optional": true, |
| 4007 | "default": null, |
| 4008 | "readonly": false, |
| 4009 | "value": null, |
| 4010 | "assert": null, |
| 4011 | "flexible": false, |
| 4012 | "overwrite": false, |
| 4013 | "source": "migration_sql.rs:647" |
| 4014 | }, |
| 4015 | "max_chatbot_threads": { |
| 4016 | "type": "option<int>", |
| 4017 | "optional": true, |
| 4018 | "default": null, |
| 4019 | "readonly": false, |
| 4020 | "value": null, |
| 4021 | "assert": null, |
| 4022 | "flexible": false, |
| 4023 | "overwrite": false, |
| 4024 | "source": "migration_sql.rs:648" |
| 4025 | }, |
| 4026 | "max_chatbot_message_len": { |
| 4027 | "type": "option<int>", |
| 4028 | "optional": true, |
| 4029 | "default": null, |
| 4030 | "readonly": false, |
| 4031 | "value": null, |
| 4032 | "assert": null, |
| 4033 | "flexible": false, |
| 4034 | "overwrite": false, |
| 4035 | "source": "migration_sql.rs:649" |
| 4036 | }, |
| 4037 | "meal_slots": { |
| 4038 | "type": "option<array<object>>", |
| 4039 | "optional": true, |
| 4040 | "default": null, |
| 4041 | "readonly": false, |
| 4042 | "value": null, |
| 4043 | "assert": null, |
| 4044 | "flexible": false, |
| 4045 | "overwrite": false, |
| 4046 | "source": "migration_sql.rs:660" |
| 4047 | }, |
| 4048 | "meal_slots.*.name": { |
| 4049 | "type": "string", |
| 4050 | "optional": false, |
| 4051 | "default": null, |
| 4052 | "readonly": false, |
| 4053 | "value": null, |
| 4054 | "assert": null, |
| 4055 | "flexible": false, |
| 4056 | "overwrite": false, |
| 4057 | "source": "migration_sql.rs:661" |
| 4058 | }, |
| 4059 | "meal_slots.*.serving_minute": { |
| 4060 | "type": "option<int>", |
| 4061 | "optional": true, |
| 4062 | "default": null, |
| 4063 | "readonly": false, |
| 4064 | "value": null, |
| 4065 | "assert": null, |
| 4066 | "flexible": false, |
| 4067 | "overwrite": false, |
| 4068 | "source": "migration_sql.rs:667" |
| 4069 | }, |
| 4070 | "dietary_tags": { |
| 4071 | "type": "option<array<string>>", |
| 4072 | "optional": true, |
| 4073 | "default": null, |
| 4074 | "readonly": false, |
| 4075 | "value": null, |
| 4076 | "assert": null, |
| 4077 | "flexible": false, |
| 4078 | "overwrite": false, |
| 4079 | "source": "migration_sql.rs:668" |
| 4080 | }, |
| 4081 | "meal_cancel_cutoff_minutes": { |
| 4082 | "type": "option<int>", |
| 4083 | "optional": true, |
| 4084 | "default": null, |
| 4085 | "readonly": false, |
| 4086 | "value": null, |
| 4087 | "assert": null, |
| 4088 | "flexible": false, |
| 4089 | "overwrite": false, |
| 4090 | "source": "migration_sql.rs:669" |
| 4091 | } |
| 4092 | }, |
| 4093 | "indexes": [] |
| 4094 | }, |
| 4095 | "homework": { |
| 4096 | "schemafull": true, |
| 4097 | "source": "migration_sql.rs:677", |
| 4098 | "fields": { |
| 4099 | "course": { |
| 4100 | "type": "record<course>", |
| 4101 | "optional": false, |
| 4102 | "default": null, |
| 4103 | "readonly": true, |
| 4104 | "value": null, |
| 4105 | "assert": null, |
| 4106 | "flexible": false, |
| 4107 | "overwrite": false, |
| 4108 | "source": "migration_sql.rs:678" |
| 4109 | }, |
| 4110 | "subject": { |
| 4111 | "type": "record<subject>", |
| 4112 | "optional": false, |
| 4113 | "default": null, |
| 4114 | "readonly": false, |
| 4115 | "value": null, |
| 4116 | "assert": null, |
| 4117 | "flexible": false, |
| 4118 | "overwrite": false, |
| 4119 | "source": "migration_sql.rs:679" |
| 4120 | }, |
| 4121 | "title": { |
| 4122 | "type": "string", |
| 4123 | "optional": false, |
| 4124 | "default": null, |
| 4125 | "readonly": false, |
| 4126 | "value": null, |
| 4127 | "assert": null, |
| 4128 | "flexible": false, |
| 4129 | "overwrite": false, |
| 4130 | "source": "migration_sql.rs:680" |
| 4131 | }, |
| 4132 | "description": { |
| 4133 | "type": "option<string>", |
| 4134 | "optional": true, |
| 4135 | "default": null, |
| 4136 | "readonly": false, |
| 4137 | "value": null, |
| 4138 | "assert": null, |
| 4139 | "flexible": false, |
| 4140 | "overwrite": false, |
| 4141 | "source": "migration_sql.rs:681" |
| 4142 | }, |
| 4143 | "due_at": { |
| 4144 | "type": "int", |
| 4145 | "optional": false, |
| 4146 | "default": null, |
| 4147 | "readonly": false, |
| 4148 | "value": null, |
| 4149 | "assert": null, |
| 4150 | "flexible": false, |
| 4151 | "overwrite": false, |
| 4152 | "source": "migration_sql.rs:682" |
| 4153 | }, |
| 4154 | "assigned": { |
| 4155 | "type": "option<array<record<user>>>", |
| 4156 | "optional": true, |
| 4157 | "default": null, |
| 4158 | "readonly": false, |
| 4159 | "value": null, |
| 4160 | "assert": null, |
| 4161 | "flexible": false, |
| 4162 | "overwrite": false, |
| 4163 | "source": "migration_sql.rs:683" |
| 4164 | }, |
| 4165 | "assigned[*]": { |
| 4166 | "type": "record<user>", |
| 4167 | "optional": false, |
| 4168 | "default": null, |
| 4169 | "readonly": false, |
| 4170 | "value": null, |
| 4171 | "assert": null, |
| 4172 | "flexible": false, |
| 4173 | "overwrite": false, |
| 4174 | "source": "migration_sql.rs:684" |
| 4175 | }, |
| 4176 | "created_by": { |
| 4177 | "type": "record<user>", |
| 4178 | "optional": false, |
| 4179 | "default": null, |
| 4180 | "readonly": true, |
| 4181 | "value": null, |
| 4182 | "assert": null, |
| 4183 | "flexible": false, |
| 4184 | "overwrite": false, |
| 4185 | "source": "migration_sql.rs:685" |
| 4186 | }, |
| 4187 | "created_at": { |
| 4188 | "type": "int", |
| 4189 | "optional": false, |
| 4190 | "default": null, |
| 4191 | "readonly": true, |
| 4192 | "value": null, |
| 4193 | "assert": null, |
| 4194 | "flexible": false, |
| 4195 | "overwrite": false, |
| 4196 | "source": "migration_sql.rs:686" |
| 4197 | } |
| 4198 | }, |
| 4199 | "indexes": [ |
| 4200 | { |
| 4201 | "name": "homework_course", |
| 4202 | "fields": [ |
| 4203 | "course" |
| 4204 | ], |
| 4205 | "unique": false, |
| 4206 | "source": "migration_sql.rs:687" |
| 4207 | } |
| 4208 | ] |
| 4209 | }, |
| 4210 | "homework_submission": { |
| 4211 | "schemafull": true, |
| 4212 | "source": "migration_sql.rs:689", |
| 4213 | "fields": { |
| 4214 | "homework": { |
| 4215 | "type": "record<homework>", |
| 4216 | "optional": false, |
| 4217 | "default": null, |
| 4218 | "readonly": true, |
| 4219 | "value": null, |
| 4220 | "assert": null, |
| 4221 | "flexible": false, |
| 4222 | "overwrite": false, |
| 4223 | "source": "migration_sql.rs:690" |
| 4224 | }, |
| 4225 | "user": { |
| 4226 | "type": "record<user>", |
| 4227 | "optional": false, |
| 4228 | "default": null, |
| 4229 | "readonly": true, |
| 4230 | "value": null, |
| 4231 | "assert": null, |
| 4232 | "flexible": false, |
| 4233 | "overwrite": false, |
| 4234 | "source": "migration_sql.rs:691" |
| 4235 | }, |
| 4236 | "text": { |
| 4237 | "type": "option<string>", |
| 4238 | "optional": true, |
| 4239 | "default": null, |
| 4240 | "readonly": false, |
| 4241 | "value": null, |
| 4242 | "assert": null, |
| 4243 | "flexible": false, |
| 4244 | "overwrite": false, |
| 4245 | "source": "migration_sql.rs:692" |
| 4246 | }, |
| 4247 | "submitted_at": { |
| 4248 | "type": "int", |
| 4249 | "optional": false, |
| 4250 | "default": null, |
| 4251 | "readonly": true, |
| 4252 | "value": null, |
| 4253 | "assert": null, |
| 4254 | "flexible": false, |
| 4255 | "overwrite": false, |
| 4256 | "source": "migration_sql.rs:693" |
| 4257 | }, |
| 4258 | "updated_at": { |
| 4259 | "type": "int", |
| 4260 | "optional": false, |
| 4261 | "default": null, |
| 4262 | "readonly": false, |
| 4263 | "value": null, |
| 4264 | "assert": null, |
| 4265 | "flexible": false, |
| 4266 | "overwrite": false, |
| 4267 | "source": "migration_sql.rs:694" |
| 4268 | }, |
| 4269 | "file_count": { |
| 4270 | "type": "option<int>", |
| 4271 | "optional": true, |
| 4272 | "default": null, |
| 4273 | "readonly": false, |
| 4274 | "value": null, |
| 4275 | "assert": null, |
| 4276 | "flexible": false, |
| 4277 | "overwrite": false, |
| 4278 | "source": "migration_sql.rs:695" |
| 4279 | }, |
| 4280 | "counted_on_time": { |
| 4281 | "type": "option<bool>", |
| 4282 | "optional": true, |
| 4283 | "default": null, |
| 4284 | "readonly": false, |
| 4285 | "value": null, |
| 4286 | "assert": null, |
| 4287 | "flexible": false, |
| 4288 | "overwrite": false, |
| 4289 | "source": "migration_sql.rs:707" |
| 4290 | }, |
| 4291 | "graded_by_result": { |
| 4292 | "type": "option<record<homework_result>>", |
| 4293 | "optional": true, |
| 4294 | "default": null, |
| 4295 | "readonly": false, |
| 4296 | "value": null, |
| 4297 | "assert": null, |
| 4298 | "flexible": false, |
| 4299 | "overwrite": false, |
| 4300 | "source": "migration_sql.rs:714" |
| 4301 | } |
| 4302 | }, |
| 4303 | "indexes": [ |
| 4304 | { |
| 4305 | "name": "homework_submission_homework", |
| 4306 | "fields": [ |
| 4307 | "homework" |
| 4308 | ], |
| 4309 | "unique": false, |
| 4310 | "source": "migration_sql.rs:715" |
| 4311 | } |
| 4312 | ] |
| 4313 | }, |
| 4314 | "homework_file": { |
| 4315 | "schemafull": true, |
| 4316 | "source": "migration_sql.rs:717", |
| 4317 | "fields": { |
| 4318 | "submission": { |
| 4319 | "type": "record<homework_submission>", |
| 4320 | "optional": false, |
| 4321 | "default": null, |
| 4322 | "readonly": true, |
| 4323 | "value": null, |
| 4324 | "assert": null, |
| 4325 | "flexible": false, |
| 4326 | "overwrite": false, |
| 4327 | "source": "migration_sql.rs:718" |
| 4328 | }, |
| 4329 | "name": { |
| 4330 | "type": "string", |
| 4331 | "optional": false, |
| 4332 | "default": null, |
| 4333 | "readonly": false, |
| 4334 | "value": null, |
| 4335 | "assert": null, |
| 4336 | "flexible": false, |
| 4337 | "overwrite": false, |
| 4338 | "source": "migration_sql.rs:719" |
| 4339 | }, |
| 4340 | "content_type": { |
| 4341 | "type": "string", |
| 4342 | "optional": false, |
| 4343 | "default": null, |
| 4344 | "readonly": false, |
| 4345 | "value": null, |
| 4346 | "assert": null, |
| 4347 | "flexible": false, |
| 4348 | "overwrite": false, |
| 4349 | "source": "migration_sql.rs:720" |
| 4350 | }, |
| 4351 | "size": { |
| 4352 | "type": "int", |
| 4353 | "optional": false, |
| 4354 | "default": null, |
| 4355 | "readonly": false, |
| 4356 | "value": null, |
| 4357 | "assert": null, |
| 4358 | "flexible": false, |
| 4359 | "overwrite": false, |
| 4360 | "source": "migration_sql.rs:721" |
| 4361 | }, |
| 4362 | "file": { |
| 4363 | "type": "string", |
| 4364 | "optional": false, |
| 4365 | "default": null, |
| 4366 | "readonly": true, |
| 4367 | "value": null, |
| 4368 | "assert": null, |
| 4369 | "flexible": false, |
| 4370 | "overwrite": false, |
| 4371 | "source": "migration_sql.rs:722" |
| 4372 | }, |
| 4373 | "created_at": { |
| 4374 | "type": "int", |
| 4375 | "optional": false, |
| 4376 | "default": null, |
| 4377 | "readonly": true, |
| 4378 | "value": null, |
| 4379 | "assert": null, |
| 4380 | "flexible": false, |
| 4381 | "overwrite": false, |
| 4382 | "source": "migration_sql.rs:723" |
| 4383 | } |
| 4384 | }, |
| 4385 | "indexes": [ |
| 4386 | { |
| 4387 | "name": "homework_file_submission", |
| 4388 | "fields": [ |
| 4389 | "submission" |
| 4390 | ], |
| 4391 | "unique": false, |
| 4392 | "source": "migration_sql.rs:724" |
| 4393 | } |
| 4394 | ] |
| 4395 | }, |
| 4396 | "homework_result": { |
| 4397 | "schemafull": true, |
| 4398 | "source": "migration_sql.rs:726", |
| 4399 | "fields": { |
| 4400 | "homework": { |
| 4401 | "type": "record<homework>", |
| 4402 | "optional": false, |
| 4403 | "default": null, |
| 4404 | "readonly": true, |
| 4405 | "value": null, |
| 4406 | "assert": null, |
| 4407 | "flexible": false, |
| 4408 | "overwrite": false, |
| 4409 | "source": "migration_sql.rs:727" |
| 4410 | }, |
| 4411 | "user": { |
| 4412 | "type": "record<user>", |
| 4413 | "optional": false, |
| 4414 | "default": null, |
| 4415 | "readonly": true, |
| 4416 | "value": null, |
| 4417 | "assert": null, |
| 4418 | "flexible": false, |
| 4419 | "overwrite": false, |
| 4420 | "source": "migration_sql.rs:728" |
| 4421 | }, |
| 4422 | "status": { |
| 4423 | "type": "string", |
| 4424 | "optional": false, |
| 4425 | "default": null, |
| 4426 | "readonly": false, |
| 4427 | "value": null, |
| 4428 | "assert": null, |
| 4429 | "flexible": false, |
| 4430 | "overwrite": false, |
| 4431 | "source": "migration_sql.rs:729" |
| 4432 | }, |
| 4433 | "mark": { |
| 4434 | "type": "option<int>", |
| 4435 | "optional": true, |
| 4436 | "default": null, |
| 4437 | "readonly": false, |
| 4438 | "value": null, |
| 4439 | "assert": null, |
| 4440 | "flexible": false, |
| 4441 | "overwrite": false, |
| 4442 | "source": "migration_sql.rs:730" |
| 4443 | }, |
| 4444 | "graded_by": { |
| 4445 | "type": "record<user>", |
| 4446 | "optional": false, |
| 4447 | "default": null, |
| 4448 | "readonly": false, |
| 4449 | "value": null, |
| 4450 | "assert": null, |
| 4451 | "flexible": false, |
| 4452 | "overwrite": false, |
| 4453 | "source": "migration_sql.rs:731" |
| 4454 | }, |
| 4455 | "created_at": { |
| 4456 | "type": "int", |
| 4457 | "optional": false, |
| 4458 | "default": null, |
| 4459 | "readonly": false, |
| 4460 | "value": null, |
| 4461 | "assert": null, |
| 4462 | "flexible": false, |
| 4463 | "overwrite": false, |
| 4464 | "source": "migration_sql.rs:732" |
| 4465 | } |
| 4466 | }, |
| 4467 | "indexes": [ |
| 4468 | { |
| 4469 | "name": "homework_result_homework", |
| 4470 | "fields": [ |
| 4471 | "homework" |
| 4472 | ], |
| 4473 | "unique": false, |
| 4474 | "source": "migration_sql.rs:733" |
| 4475 | } |
| 4476 | ] |
| 4477 | }, |
| 4478 | "appointment_slot": { |
| 4479 | "schemafull": true, |
| 4480 | "source": "migration_sql.rs:745", |
| 4481 | "fields": { |
| 4482 | "teacher": { |
| 4483 | "type": "record<user>", |
| 4484 | "optional": false, |
| 4485 | "default": null, |
| 4486 | "readonly": false, |
| 4487 | "value": null, |
| 4488 | "assert": null, |
| 4489 | "flexible": false, |
| 4490 | "overwrite": false, |
| 4491 | "source": "migration_sql.rs:746" |
| 4492 | }, |
| 4493 | "starts_at": { |
| 4494 | "type": "int", |
| 4495 | "optional": false, |
| 4496 | "default": null, |
| 4497 | "readonly": false, |
| 4498 | "value": null, |
| 4499 | "assert": null, |
| 4500 | "flexible": false, |
| 4501 | "overwrite": false, |
| 4502 | "source": "migration_sql.rs:747" |
| 4503 | }, |
| 4504 | "ends_at": { |
| 4505 | "type": "int", |
| 4506 | "optional": false, |
| 4507 | "default": null, |
| 4508 | "readonly": false, |
| 4509 | "value": null, |
| 4510 | "assert": null, |
| 4511 | "flexible": false, |
| 4512 | "overwrite": false, |
| 4513 | "source": "migration_sql.rs:748" |
| 4514 | }, |
| 4515 | "occupied": { |
| 4516 | "type": "option<int>", |
| 4517 | "optional": true, |
| 4518 | "default": null, |
| 4519 | "readonly": false, |
| 4520 | "value": null, |
| 4521 | "assert": null, |
| 4522 | "flexible": false, |
| 4523 | "overwrite": false, |
| 4524 | "source": "migration_sql.rs:749" |
| 4525 | }, |
| 4526 | "note": { |
| 4527 | "type": "option<string>", |
| 4528 | "optional": true, |
| 4529 | "default": null, |
| 4530 | "readonly": false, |
| 4531 | "value": null, |
| 4532 | "assert": null, |
| 4533 | "flexible": false, |
| 4534 | "overwrite": false, |
| 4535 | "source": "migration_sql.rs:750" |
| 4536 | }, |
| 4537 | "series": { |
| 4538 | "type": "option<string>", |
| 4539 | "optional": true, |
| 4540 | "default": null, |
| 4541 | "readonly": false, |
| 4542 | "value": null, |
| 4543 | "assert": null, |
| 4544 | "flexible": false, |
| 4545 | "overwrite": false, |
| 4546 | "source": "migration_sql.rs:751" |
| 4547 | }, |
| 4548 | "created_at": { |
| 4549 | "type": "int", |
| 4550 | "optional": false, |
| 4551 | "default": null, |
| 4552 | "readonly": false, |
| 4553 | "value": null, |
| 4554 | "assert": null, |
| 4555 | "flexible": false, |
| 4556 | "overwrite": false, |
| 4557 | "source": "migration_sql.rs:752" |
| 4558 | } |
| 4559 | }, |
| 4560 | "indexes": [ |
| 4561 | { |
| 4562 | "name": "appointment_slot_teacher_starts", |
| 4563 | "fields": [ |
| 4564 | "teacher", |
| 4565 | "starts_at" |
| 4566 | ], |
| 4567 | "unique": false, |
| 4568 | "source": "migration_sql.rs:753" |
| 4569 | }, |
| 4570 | { |
| 4571 | "name": "appointment_slot_series", |
| 4572 | "fields": [ |
| 4573 | "series" |
| 4574 | ], |
| 4575 | "unique": false, |
| 4576 | "source": "migration_sql.rs:754" |
| 4577 | } |
| 4578 | ] |
| 4579 | }, |
| 4580 | "appointment": { |
| 4581 | "schemafull": true, |
| 4582 | "source": "migration_sql.rs:756", |
| 4583 | "fields": { |
| 4584 | "slot": { |
| 4585 | "type": "record<appointment_slot>", |
| 4586 | "optional": false, |
| 4587 | "default": null, |
| 4588 | "readonly": false, |
| 4589 | "value": null, |
| 4590 | "assert": null, |
| 4591 | "flexible": false, |
| 4592 | "overwrite": false, |
| 4593 | "source": "migration_sql.rs:757" |
| 4594 | }, |
| 4595 | "requester": { |
| 4596 | "type": "record<user>", |
| 4597 | "optional": false, |
| 4598 | "default": null, |
| 4599 | "readonly": false, |
| 4600 | "value": null, |
| 4601 | "assert": null, |
| 4602 | "flexible": false, |
| 4603 | "overwrite": false, |
| 4604 | "source": "migration_sql.rs:758" |
| 4605 | }, |
| 4606 | "status": { |
| 4607 | "type": "string", |
| 4608 | "optional": false, |
| 4609 | "default": "'pending'", |
| 4610 | "readonly": false, |
| 4611 | "value": null, |
| 4612 | "assert": null, |
| 4613 | "flexible": false, |
| 4614 | "overwrite": false, |
| 4615 | "source": "migration_sql.rs:759" |
| 4616 | }, |
| 4617 | "reason": { |
| 4618 | "type": "string", |
| 4619 | "optional": false, |
| 4620 | "default": null, |
| 4621 | "readonly": false, |
| 4622 | "value": null, |
| 4623 | "assert": null, |
| 4624 | "flexible": false, |
| 4625 | "overwrite": false, |
| 4626 | "source": "migration_sql.rs:760" |
| 4627 | }, |
| 4628 | "proposed_starts_at": { |
| 4629 | "type": "option<int>", |
| 4630 | "optional": true, |
| 4631 | "default": null, |
| 4632 | "readonly": false, |
| 4633 | "value": null, |
| 4634 | "assert": null, |
| 4635 | "flexible": false, |
| 4636 | "overwrite": false, |
| 4637 | "source": "migration_sql.rs:761" |
| 4638 | }, |
| 4639 | "proposed_ends_at": { |
| 4640 | "type": "option<int>", |
| 4641 | "optional": true, |
| 4642 | "default": null, |
| 4643 | "readonly": false, |
| 4644 | "value": null, |
| 4645 | "assert": null, |
| 4646 | "flexible": false, |
| 4647 | "overwrite": false, |
| 4648 | "source": "migration_sql.rs:762" |
| 4649 | }, |
| 4650 | "proposed_by": { |
| 4651 | "type": "option<record<user>>", |
| 4652 | "optional": true, |
| 4653 | "default": null, |
| 4654 | "readonly": false, |
| 4655 | "value": null, |
| 4656 | "assert": null, |
| 4657 | "flexible": false, |
| 4658 | "overwrite": false, |
| 4659 | "source": "migration_sql.rs:763" |
| 4660 | }, |
| 4661 | "decided_by": { |
| 4662 | "type": "option<record<user>>", |
| 4663 | "optional": true, |
| 4664 | "default": null, |
| 4665 | "readonly": false, |
| 4666 | "value": null, |
| 4667 | "assert": null, |
| 4668 | "flexible": false, |
| 4669 | "overwrite": false, |
| 4670 | "source": "migration_sql.rs:764" |
| 4671 | }, |
| 4672 | "cancelled_by": { |
| 4673 | "type": "option<record<user>>", |
| 4674 | "optional": true, |
| 4675 | "default": null, |
| 4676 | "readonly": false, |
| 4677 | "value": null, |
| 4678 | "assert": null, |
| 4679 | "flexible": false, |
| 4680 | "overwrite": false, |
| 4681 | "source": "migration_sql.rs:765" |
| 4682 | }, |
| 4683 | "cancel_reason": { |
| 4684 | "type": "option<string>", |
| 4685 | "optional": true, |
| 4686 | "default": null, |
| 4687 | "readonly": false, |
| 4688 | "value": null, |
| 4689 | "assert": null, |
| 4690 | "flexible": false, |
| 4691 | "overwrite": false, |
| 4692 | "source": "migration_sql.rs:766" |
| 4693 | }, |
| 4694 | "reject_reason": { |
| 4695 | "type": "option<string>", |
| 4696 | "optional": true, |
| 4697 | "default": null, |
| 4698 | "readonly": false, |
| 4699 | "value": null, |
| 4700 | "assert": null, |
| 4701 | "flexible": false, |
| 4702 | "overwrite": false, |
| 4703 | "source": "migration_sql.rs:767" |
| 4704 | }, |
| 4705 | "created_at": { |
| 4706 | "type": "int", |
| 4707 | "optional": false, |
| 4708 | "default": null, |
| 4709 | "readonly": false, |
| 4710 | "value": null, |
| 4711 | "assert": null, |
| 4712 | "flexible": false, |
| 4713 | "overwrite": false, |
| 4714 | "source": "migration_sql.rs:768" |
| 4715 | } |
| 4716 | }, |
| 4717 | "indexes": [ |
| 4718 | { |
| 4719 | "name": "appointment_slot_ref", |
| 4720 | "fields": [ |
| 4721 | "slot" |
| 4722 | ], |
| 4723 | "unique": false, |
| 4724 | "source": "migration_sql.rs:769" |
| 4725 | }, |
| 4726 | { |
| 4727 | "name": "appointment_requester", |
| 4728 | "fields": [ |
| 4729 | "requester" |
| 4730 | ], |
| 4731 | "unique": false, |
| 4732 | "source": "migration_sql.rs:770" |
| 4733 | }, |
| 4734 | { |
| 4735 | "name": "appointment_status", |
| 4736 | "fields": [ |
| 4737 | "status" |
| 4738 | ], |
| 4739 | "unique": false, |
| 4740 | "source": "migration_sql.rs:771" |
| 4741 | } |
| 4742 | ] |
| 4743 | }, |
| 4744 | "menu": { |
| 4745 | "schemafull": true, |
| 4746 | "source": "migration_sql.rs:781", |
| 4747 | "fields": { |
| 4748 | "date": { |
| 4749 | "type": "string", |
| 4750 | "optional": false, |
| 4751 | "default": null, |
| 4752 | "readonly": true, |
| 4753 | "value": null, |
| 4754 | "assert": null, |
| 4755 | "flexible": false, |
| 4756 | "overwrite": false, |
| 4757 | "source": "migration_sql.rs:782" |
| 4758 | }, |
| 4759 | "slot": { |
| 4760 | "type": "string", |
| 4761 | "optional": false, |
| 4762 | "default": null, |
| 4763 | "readonly": true, |
| 4764 | "value": null, |
| 4765 | "assert": null, |
| 4766 | "flexible": false, |
| 4767 | "overwrite": false, |
| 4768 | "source": "migration_sql.rs:783" |
| 4769 | }, |
| 4770 | "capacity": { |
| 4771 | "type": "option<int>", |
| 4772 | "optional": true, |
| 4773 | "default": null, |
| 4774 | "readonly": false, |
| 4775 | "value": null, |
| 4776 | "assert": null, |
| 4777 | "flexible": false, |
| 4778 | "overwrite": false, |
| 4779 | "source": "migration_sql.rs:784" |
| 4780 | }, |
| 4781 | "seats_booked": { |
| 4782 | "type": "option<int>", |
| 4783 | "optional": true, |
| 4784 | "default": null, |
| 4785 | "readonly": false, |
| 4786 | "value": null, |
| 4787 | "assert": null, |
| 4788 | "flexible": false, |
| 4789 | "overwrite": false, |
| 4790 | "source": "migration_sql.rs:790" |
| 4791 | }, |
| 4792 | "version": { |
| 4793 | "type": "option<int>", |
| 4794 | "optional": true, |
| 4795 | "default": null, |
| 4796 | "readonly": false, |
| 4797 | "value": null, |
| 4798 | "assert": null, |
| 4799 | "flexible": false, |
| 4800 | "overwrite": false, |
| 4801 | "source": "migration_sql.rs:791" |
| 4802 | }, |
| 4803 | "created_by": { |
| 4804 | "type": "record<user>", |
| 4805 | "optional": false, |
| 4806 | "default": null, |
| 4807 | "readonly": true, |
| 4808 | "value": null, |
| 4809 | "assert": null, |
| 4810 | "flexible": false, |
| 4811 | "overwrite": false, |
| 4812 | "source": "migration_sql.rs:792" |
| 4813 | }, |
| 4814 | "created_at": { |
| 4815 | "type": "int", |
| 4816 | "optional": false, |
| 4817 | "default": null, |
| 4818 | "readonly": true, |
| 4819 | "value": null, |
| 4820 | "assert": null, |
| 4821 | "flexible": false, |
| 4822 | "overwrite": false, |
| 4823 | "source": "migration_sql.rs:793" |
| 4824 | } |
| 4825 | }, |
| 4826 | "indexes": [ |
| 4827 | { |
| 4828 | "name": "menu_date_slot", |
| 4829 | "fields": [ |
| 4830 | "date", |
| 4831 | "slot" |
| 4832 | ], |
| 4833 | "unique": true, |
| 4834 | "source": "migration_sql.rs:794" |
| 4835 | } |
| 4836 | ] |
| 4837 | }, |
| 4838 | "menu_dish": { |
| 4839 | "schemafull": true, |
| 4840 | "source": "migration_sql.rs:796", |
| 4841 | "fields": { |
| 4842 | "menu": { |
| 4843 | "type": "record<menu>", |
| 4844 | "optional": false, |
| 4845 | "default": null, |
| 4846 | "readonly": true, |
| 4847 | "value": null, |
| 4848 | "assert": null, |
| 4849 | "flexible": false, |
| 4850 | "overwrite": false, |
| 4851 | "source": "migration_sql.rs:797" |
| 4852 | }, |
| 4853 | "name": { |
| 4854 | "type": "string", |
| 4855 | "optional": false, |
| 4856 | "default": null, |
| 4857 | "readonly": false, |
| 4858 | "value": null, |
| 4859 | "assert": null, |
| 4860 | "flexible": false, |
| 4861 | "overwrite": false, |
| 4862 | "source": "migration_sql.rs:798" |
| 4863 | }, |
| 4864 | "description": { |
| 4865 | "type": "option<string>", |
| 4866 | "optional": true, |
| 4867 | "default": null, |
| 4868 | "readonly": false, |
| 4869 | "value": null, |
| 4870 | "assert": null, |
| 4871 | "flexible": false, |
| 4872 | "overwrite": false, |
| 4873 | "source": "migration_sql.rs:799" |
| 4874 | }, |
| 4875 | "price_minor": { |
| 4876 | "type": "int", |
| 4877 | "optional": false, |
| 4878 | "default": null, |
| 4879 | "readonly": false, |
| 4880 | "value": null, |
| 4881 | "assert": null, |
| 4882 | "flexible": false, |
| 4883 | "overwrite": false, |
| 4884 | "source": "migration_sql.rs:801" |
| 4885 | }, |
| 4886 | "tags": { |
| 4887 | "type": "array<string>", |
| 4888 | "optional": false, |
| 4889 | "default": "[]", |
| 4890 | "readonly": false, |
| 4891 | "value": null, |
| 4892 | "assert": null, |
| 4893 | "flexible": false, |
| 4894 | "overwrite": false, |
| 4895 | "source": "migration_sql.rs:802" |
| 4896 | }, |
| 4897 | "tags[*]": { |
| 4898 | "type": "string", |
| 4899 | "optional": false, |
| 4900 | "default": null, |
| 4901 | "readonly": false, |
| 4902 | "value": null, |
| 4903 | "assert": null, |
| 4904 | "flexible": false, |
| 4905 | "overwrite": false, |
| 4906 | "source": "migration_sql.rs:803" |
| 4907 | }, |
| 4908 | "created_at": { |
| 4909 | "type": "int", |
| 4910 | "optional": false, |
| 4911 | "default": null, |
| 4912 | "readonly": true, |
| 4913 | "value": null, |
| 4914 | "assert": null, |
| 4915 | "flexible": false, |
| 4916 | "overwrite": false, |
| 4917 | "source": "migration_sql.rs:804" |
| 4918 | } |
| 4919 | }, |
| 4920 | "indexes": [ |
| 4921 | { |
| 4922 | "name": "menu_dish_menu", |
| 4923 | "fields": [ |
| 4924 | "menu" |
| 4925 | ], |
| 4926 | "unique": false, |
| 4927 | "source": "migration_sql.rs:805" |
| 4928 | } |
| 4929 | ] |
| 4930 | }, |
| 4931 | "dietary_profile": { |
| 4932 | "schemafull": true, |
| 4933 | "source": "migration_sql.rs:807", |
| 4934 | "fields": { |
| 4935 | "student": { |
| 4936 | "type": "record<user>", |
| 4937 | "optional": false, |
| 4938 | "default": null, |
| 4939 | "readonly": true, |
| 4940 | "value": null, |
| 4941 | "assert": null, |
| 4942 | "flexible": false, |
| 4943 | "overwrite": false, |
| 4944 | "source": "migration_sql.rs:808" |
| 4945 | }, |
| 4946 | "tags": { |
| 4947 | "type": "array<string>", |
| 4948 | "optional": false, |
| 4949 | "default": "[]", |
| 4950 | "readonly": false, |
| 4951 | "value": null, |
| 4952 | "assert": null, |
| 4953 | "flexible": false, |
| 4954 | "overwrite": false, |
| 4955 | "source": "migration_sql.rs:809" |
| 4956 | }, |
| 4957 | "tags[*]": { |
| 4958 | "type": "string", |
| 4959 | "optional": false, |
| 4960 | "default": null, |
| 4961 | "readonly": false, |
| 4962 | "value": null, |
| 4963 | "assert": null, |
| 4964 | "flexible": false, |
| 4965 | "overwrite": false, |
| 4966 | "source": "migration_sql.rs:810" |
| 4967 | }, |
| 4968 | "note": { |
| 4969 | "type": "option<string>", |
| 4970 | "optional": true, |
| 4971 | "default": null, |
| 4972 | "readonly": false, |
| 4973 | "value": null, |
| 4974 | "assert": null, |
| 4975 | "flexible": false, |
| 4976 | "overwrite": false, |
| 4977 | "source": "migration_sql.rs:811" |
| 4978 | }, |
| 4979 | "updated_by": { |
| 4980 | "type": "record<user>", |
| 4981 | "optional": false, |
| 4982 | "default": null, |
| 4983 | "readonly": false, |
| 4984 | "value": null, |
| 4985 | "assert": null, |
| 4986 | "flexible": false, |
| 4987 | "overwrite": false, |
| 4988 | "source": "migration_sql.rs:812" |
| 4989 | }, |
| 4990 | "updated_at": { |
| 4991 | "type": "int", |
| 4992 | "optional": false, |
| 4993 | "default": null, |
| 4994 | "readonly": false, |
| 4995 | "value": null, |
| 4996 | "assert": null, |
| 4997 | "flexible": false, |
| 4998 | "overwrite": false, |
| 4999 | "source": "migration_sql.rs:813" |
| 5000 | } |
| 5001 | }, |
| 5002 | "indexes": [ |
| 5003 | { |
| 5004 | "name": "dietary_profile_student", |
| 5005 | "fields": [ |
| 5006 | "student" |
| 5007 | ], |
| 5008 | "unique": true, |
| 5009 | "source": "migration_sql.rs:814" |
| 5010 | } |
| 5011 | ] |
| 5012 | }, |
| 5013 | "meal_booking": { |
| 5014 | "schemafull": true, |
| 5015 | "source": "migration_sql.rs:818", |
| 5016 | "fields": { |
| 5017 | "menu": { |
| 5018 | "type": "record<menu>", |
| 5019 | "optional": false, |
| 5020 | "default": null, |
| 5021 | "readonly": true, |
| 5022 | "value": null, |
| 5023 | "assert": null, |
| 5024 | "flexible": false, |
| 5025 | "overwrite": false, |
| 5026 | "source": "migration_sql.rs:819" |
| 5027 | }, |
| 5028 | "student": { |
| 5029 | "type": "record<user>", |
| 5030 | "optional": false, |
| 5031 | "default": null, |
| 5032 | "readonly": true, |
| 5033 | "value": null, |
| 5034 | "assert": null, |
| 5035 | "flexible": false, |
| 5036 | "overwrite": false, |
| 5037 | "source": "migration_sql.rs:820" |
| 5038 | }, |
| 5039 | "booked_by": { |
| 5040 | "type": "record<user>", |
| 5041 | "optional": false, |
| 5042 | "default": null, |
| 5043 | "readonly": true, |
| 5044 | "value": null, |
| 5045 | "assert": null, |
| 5046 | "flexible": false, |
| 5047 | "overwrite": false, |
| 5048 | "source": "migration_sql.rs:821" |
| 5049 | }, |
| 5050 | "status": { |
| 5051 | "type": "string", |
| 5052 | "optional": false, |
| 5053 | "default": "'booked'", |
| 5054 | "readonly": false, |
| 5055 | "value": null, |
| 5056 | "assert": null, |
| 5057 | "flexible": false, |
| 5058 | "overwrite": false, |
| 5059 | "source": "migration_sql.rs:822" |
| 5060 | }, |
| 5061 | "attempt": { |
| 5062 | "type": "int", |
| 5063 | "optional": false, |
| 5064 | "default": "1", |
| 5065 | "readonly": false, |
| 5066 | "value": null, |
| 5067 | "assert": null, |
| 5068 | "flexible": false, |
| 5069 | "overwrite": false, |
| 5070 | "source": "migration_sql.rs:827" |
| 5071 | }, |
| 5072 | "price_minor": { |
| 5073 | "type": "option<int>", |
| 5074 | "optional": true, |
| 5075 | "default": null, |
| 5076 | "readonly": false, |
| 5077 | "value": null, |
| 5078 | "assert": null, |
| 5079 | "flexible": false, |
| 5080 | "overwrite": false, |
| 5081 | "source": "migration_sql.rs:828" |
| 5082 | }, |
| 5083 | "cancelled_at": { |
| 5084 | "type": "option<int>", |
| 5085 | "optional": true, |
| 5086 | "default": null, |
| 5087 | "readonly": false, |
| 5088 | "value": null, |
| 5089 | "assert": null, |
| 5090 | "flexible": false, |
| 5091 | "overwrite": false, |
| 5092 | "source": "migration_sql.rs:829" |
| 5093 | }, |
| 5094 | "created_at": { |
| 5095 | "type": "int", |
| 5096 | "optional": false, |
| 5097 | "default": null, |
| 5098 | "readonly": true, |
| 5099 | "value": null, |
| 5100 | "assert": null, |
| 5101 | "flexible": false, |
| 5102 | "overwrite": false, |
| 5103 | "source": "migration_sql.rs:830" |
| 5104 | } |
| 5105 | }, |
| 5106 | "indexes": [ |
| 5107 | { |
| 5108 | "name": "meal_booking_menu", |
| 5109 | "fields": [ |
| 5110 | "menu" |
| 5111 | ], |
| 5112 | "unique": false, |
| 5113 | "source": "migration_sql.rs:831" |
| 5114 | }, |
| 5115 | { |
| 5116 | "name": "meal_booking_student", |
| 5117 | "fields": [ |
| 5118 | "student" |
| 5119 | ], |
| 5120 | "unique": false, |
| 5121 | "source": "migration_sql.rs:832" |
| 5122 | } |
| 5123 | ] |
| 5124 | }, |
| 5125 | "meal_attendance": { |
| 5126 | "schemafull": true, |
| 5127 | "source": "migration_sql.rs:834", |
| 5128 | "fields": { |
| 5129 | "menu": { |
| 5130 | "type": "record<menu>", |
| 5131 | "optional": false, |
| 5132 | "default": null, |
| 5133 | "readonly": true, |
| 5134 | "value": null, |
| 5135 | "assert": null, |
| 5136 | "flexible": false, |
| 5137 | "overwrite": false, |
| 5138 | "source": "migration_sql.rs:835" |
| 5139 | }, |
| 5140 | "student": { |
| 5141 | "type": "record<user>", |
| 5142 | "optional": false, |
| 5143 | "default": null, |
| 5144 | "readonly": true, |
| 5145 | "value": null, |
| 5146 | "assert": null, |
| 5147 | "flexible": false, |
| 5148 | "overwrite": false, |
| 5149 | "source": "migration_sql.rs:836" |
| 5150 | }, |
| 5151 | "status": { |
| 5152 | "type": "string", |
| 5153 | "optional": false, |
| 5154 | "default": null, |
| 5155 | "readonly": false, |
| 5156 | "value": null, |
| 5157 | "assert": null, |
| 5158 | "flexible": false, |
| 5159 | "overwrite": false, |
| 5160 | "source": "migration_sql.rs:837" |
| 5161 | }, |
| 5162 | "marked_by": { |
| 5163 | "type": "record<user>", |
| 5164 | "optional": false, |
| 5165 | "default": null, |
| 5166 | "readonly": false, |
| 5167 | "value": null, |
| 5168 | "assert": null, |
| 5169 | "flexible": false, |
| 5170 | "overwrite": false, |
| 5171 | "source": "migration_sql.rs:838" |
| 5172 | }, |
| 5173 | "marked_at": { |
| 5174 | "type": "int", |
| 5175 | "optional": false, |
| 5176 | "default": null, |
| 5177 | "readonly": false, |
| 5178 | "value": null, |
| 5179 | "assert": null, |
| 5180 | "flexible": false, |
| 5181 | "overwrite": false, |
| 5182 | "source": "migration_sql.rs:839" |
| 5183 | } |
| 5184 | }, |
| 5185 | "indexes": [ |
| 5186 | { |
| 5187 | "name": "meal_attendance_menu_student", |
| 5188 | "fields": [ |
| 5189 | "menu", |
| 5190 | "student" |
| 5191 | ], |
| 5192 | "unique": true, |
| 5193 | "source": "migration_sql.rs:840" |
| 5194 | } |
| 5195 | ] |
| 5196 | }, |
| 5197 | "meal_ledger": { |
| 5198 | "schemafull": true, |
| 5199 | "source": "migration_sql.rs:846", |
| 5200 | "fields": { |
| 5201 | "student": { |
| 5202 | "type": "record<user>", |
| 5203 | "optional": false, |
| 5204 | "default": null, |
| 5205 | "readonly": true, |
| 5206 | "value": null, |
| 5207 | "assert": null, |
| 5208 | "flexible": false, |
| 5209 | "overwrite": false, |
| 5210 | "source": "migration_sql.rs:847" |
| 5211 | }, |
| 5212 | "kind": { |
| 5213 | "type": "string", |
| 5214 | "optional": false, |
| 5215 | "default": null, |
| 5216 | "readonly": true, |
| 5217 | "value": null, |
| 5218 | "assert": null, |
| 5219 | "flexible": false, |
| 5220 | "overwrite": false, |
| 5221 | "source": "migration_sql.rs:848" |
| 5222 | }, |
| 5223 | "amount_minor": { |
| 5224 | "type": "int", |
| 5225 | "optional": false, |
| 5226 | "default": null, |
| 5227 | "readonly": true, |
| 5228 | "value": null, |
| 5229 | "assert": null, |
| 5230 | "flexible": false, |
| 5231 | "overwrite": false, |
| 5232 | "source": "migration_sql.rs:849" |
| 5233 | }, |
| 5234 | "source": { |
| 5235 | "type": "option<record>", |
| 5236 | "optional": true, |
| 5237 | "default": null, |
| 5238 | "readonly": true, |
| 5239 | "value": null, |
| 5240 | "assert": null, |
| 5241 | "flexible": false, |
| 5242 | "overwrite": false, |
| 5243 | "source": "migration_sql.rs:850" |
| 5244 | }, |
| 5245 | "method": { |
| 5246 | "type": "option<string>", |
| 5247 | "optional": true, |
| 5248 | "default": null, |
| 5249 | "readonly": true, |
| 5250 | "value": null, |
| 5251 | "assert": null, |
| 5252 | "flexible": false, |
| 5253 | "overwrite": false, |
| 5254 | "source": "migration_sql.rs:851" |
| 5255 | }, |
| 5256 | "note": { |
| 5257 | "type": "option<string>", |
| 5258 | "optional": true, |
| 5259 | "default": null, |
| 5260 | "readonly": true, |
| 5261 | "value": null, |
| 5262 | "assert": null, |
| 5263 | "flexible": false, |
| 5264 | "overwrite": false, |
| 5265 | "source": "migration_sql.rs:852" |
| 5266 | }, |
| 5267 | "recorded_by": { |
| 5268 | "type": "record<user>", |
| 5269 | "optional": false, |
| 5270 | "default": null, |
| 5271 | "readonly": true, |
| 5272 | "value": null, |
| 5273 | "assert": null, |
| 5274 | "flexible": false, |
| 5275 | "overwrite": false, |
| 5276 | "source": "migration_sql.rs:853" |
| 5277 | }, |
| 5278 | "created_at": { |
| 5279 | "type": "int", |
| 5280 | "optional": false, |
| 5281 | "default": null, |
| 5282 | "readonly": true, |
| 5283 | "value": null, |
| 5284 | "assert": null, |
| 5285 | "flexible": false, |
| 5286 | "overwrite": false, |
| 5287 | "source": "migration_sql.rs:854" |
| 5288 | } |
| 5289 | }, |
| 5290 | "indexes": [ |
| 5291 | { |
| 5292 | "name": "meal_ledger_student", |
| 5293 | "fields": [ |
| 5294 | "student" |
| 5295 | ], |
| 5296 | "unique": false, |
| 5297 | "source": "migration_sql.rs:855" |
| 5298 | } |
| 5299 | ] |
| 5300 | }, |
| 5301 | "fee_plan": { |
| 5302 | "schemafull": true, |
| 5303 | "source": "migration_sql.rs:863", |
| 5304 | "fields": { |
| 5305 | "name": { |
| 5306 | "type": "string", |
| 5307 | "optional": false, |
| 5308 | "default": null, |
| 5309 | "readonly": false, |
| 5310 | "value": null, |
| 5311 | "assert": null, |
| 5312 | "flexible": false, |
| 5313 | "overwrite": false, |
| 5314 | "source": "migration_sql.rs:864" |
| 5315 | }, |
| 5316 | "installments": { |
| 5317 | "type": "array<object>", |
| 5318 | "optional": false, |
| 5319 | "default": null, |
| 5320 | "readonly": false, |
| 5321 | "value": null, |
| 5322 | "assert": null, |
| 5323 | "flexible": false, |
| 5324 | "overwrite": false, |
| 5325 | "source": "migration_sql.rs:865" |
| 5326 | }, |
| 5327 | "installments.*.amount_minor": { |
| 5328 | "type": "int", |
| 5329 | "optional": false, |
| 5330 | "default": null, |
| 5331 | "readonly": false, |
| 5332 | "value": null, |
| 5333 | "assert": null, |
| 5334 | "flexible": false, |
| 5335 | "overwrite": false, |
| 5336 | "source": "migration_sql.rs:866" |
| 5337 | }, |
| 5338 | "installments.*.due_at": { |
| 5339 | "type": "int", |
| 5340 | "optional": false, |
| 5341 | "default": null, |
| 5342 | "readonly": false, |
| 5343 | "value": null, |
| 5344 | "assert": null, |
| 5345 | "flexible": false, |
| 5346 | "overwrite": false, |
| 5347 | "source": "migration_sql.rs:867" |
| 5348 | }, |
| 5349 | "created_by": { |
| 5350 | "type": "record<user>", |
| 5351 | "optional": false, |
| 5352 | "default": null, |
| 5353 | "readonly": true, |
| 5354 | "value": null, |
| 5355 | "assert": null, |
| 5356 | "flexible": false, |
| 5357 | "overwrite": false, |
| 5358 | "source": "migration_sql.rs:868" |
| 5359 | }, |
| 5360 | "created_at": { |
| 5361 | "type": "int", |
| 5362 | "optional": false, |
| 5363 | "default": null, |
| 5364 | "readonly": true, |
| 5365 | "value": null, |
| 5366 | "assert": null, |
| 5367 | "flexible": false, |
| 5368 | "overwrite": false, |
| 5369 | "source": "migration_sql.rs:869" |
| 5370 | }, |
| 5371 | "assignment_count": { |
| 5372 | "type": "option<int>", |
| 5373 | "optional": true, |
| 5374 | "default": null, |
| 5375 | "readonly": false, |
| 5376 | "value": null, |
| 5377 | "assert": null, |
| 5378 | "flexible": false, |
| 5379 | "overwrite": false, |
| 5380 | "source": "migration_sql.rs:875" |
| 5381 | } |
| 5382 | }, |
| 5383 | "indexes": [] |
| 5384 | }, |
| 5385 | "fee_plan_assignment": { |
| 5386 | "schemafull": true, |
| 5387 | "source": "migration_sql.rs:880", |
| 5388 | "fields": { |
| 5389 | "plan": { |
| 5390 | "type": "record<fee_plan>", |
| 5391 | "optional": false, |
| 5392 | "default": null, |
| 5393 | "readonly": true, |
| 5394 | "value": null, |
| 5395 | "assert": null, |
| 5396 | "flexible": false, |
| 5397 | "overwrite": false, |
| 5398 | "source": "migration_sql.rs:881" |
| 5399 | }, |
| 5400 | "student": { |
| 5401 | "type": "record<user>", |
| 5402 | "optional": false, |
| 5403 | "default": null, |
| 5404 | "readonly": true, |
| 5405 | "value": null, |
| 5406 | "assert": null, |
| 5407 | "flexible": false, |
| 5408 | "overwrite": false, |
| 5409 | "source": "migration_sql.rs:882" |
| 5410 | }, |
| 5411 | "assigned_by": { |
| 5412 | "type": "record<user>", |
| 5413 | "optional": false, |
| 5414 | "default": null, |
| 5415 | "readonly": true, |
| 5416 | "value": null, |
| 5417 | "assert": null, |
| 5418 | "flexible": false, |
| 5419 | "overwrite": false, |
| 5420 | "source": "migration_sql.rs:883" |
| 5421 | }, |
| 5422 | "created_at": { |
| 5423 | "type": "int", |
| 5424 | "optional": false, |
| 5425 | "default": null, |
| 5426 | "readonly": true, |
| 5427 | "value": null, |
| 5428 | "assert": null, |
| 5429 | "flexible": false, |
| 5430 | "overwrite": false, |
| 5431 | "source": "migration_sql.rs:884" |
| 5432 | } |
| 5433 | }, |
| 5434 | "indexes": [ |
| 5435 | { |
| 5436 | "name": "fee_plan_assignment_plan", |
| 5437 | "fields": [ |
| 5438 | "plan" |
| 5439 | ], |
| 5440 | "unique": false, |
| 5441 | "source": "migration_sql.rs:885" |
| 5442 | }, |
| 5443 | { |
| 5444 | "name": "fee_plan_assignment_student", |
| 5445 | "fields": [ |
| 5446 | "student" |
| 5447 | ], |
| 5448 | "unique": false, |
| 5449 | "source": "migration_sql.rs:886" |
| 5450 | } |
| 5451 | ] |
| 5452 | }, |
| 5453 | "payment_ledger": { |
| 5454 | "schemafull": true, |
| 5455 | "source": "migration_sql.rs:894", |
| 5456 | "fields": { |
| 5457 | "student": { |
| 5458 | "type": "record<user>", |
| 5459 | "optional": false, |
| 5460 | "default": null, |
| 5461 | "readonly": true, |
| 5462 | "value": null, |
| 5463 | "assert": null, |
| 5464 | "flexible": false, |
| 5465 | "overwrite": false, |
| 5466 | "source": "migration_sql.rs:895" |
| 5467 | }, |
| 5468 | "kind": { |
| 5469 | "type": "string", |
| 5470 | "optional": false, |
| 5471 | "default": null, |
| 5472 | "readonly": true, |
| 5473 | "value": null, |
| 5474 | "assert": null, |
| 5475 | "flexible": false, |
| 5476 | "overwrite": false, |
| 5477 | "source": "migration_sql.rs:896" |
| 5478 | }, |
| 5479 | "amount_minor": { |
| 5480 | "type": "int", |
| 5481 | "optional": false, |
| 5482 | "default": null, |
| 5483 | "readonly": true, |
| 5484 | "value": null, |
| 5485 | "assert": null, |
| 5486 | "flexible": false, |
| 5487 | "overwrite": false, |
| 5488 | "source": "migration_sql.rs:897" |
| 5489 | }, |
| 5490 | "source": { |
| 5491 | "type": "option<record>", |
| 5492 | "optional": true, |
| 5493 | "default": null, |
| 5494 | "readonly": true, |
| 5495 | "value": null, |
| 5496 | "assert": null, |
| 5497 | "flexible": false, |
| 5498 | "overwrite": false, |
| 5499 | "source": "migration_sql.rs:898" |
| 5500 | }, |
| 5501 | "due_at": { |
| 5502 | "type": "option<int>", |
| 5503 | "optional": true, |
| 5504 | "default": null, |
| 5505 | "readonly": true, |
| 5506 | "value": null, |
| 5507 | "assert": null, |
| 5508 | "flexible": false, |
| 5509 | "overwrite": false, |
| 5510 | "source": "migration_sql.rs:899" |
| 5511 | }, |
| 5512 | "method": { |
| 5513 | "type": "option<string>", |
| 5514 | "optional": true, |
| 5515 | "default": null, |
| 5516 | "readonly": true, |
| 5517 | "value": null, |
| 5518 | "assert": null, |
| 5519 | "flexible": false, |
| 5520 | "overwrite": false, |
| 5521 | "source": "migration_sql.rs:900" |
| 5522 | }, |
| 5523 | "note": { |
| 5524 | "type": "option<string>", |
| 5525 | "optional": true, |
| 5526 | "default": null, |
| 5527 | "readonly": true, |
| 5528 | "value": null, |
| 5529 | "assert": null, |
| 5530 | "flexible": false, |
| 5531 | "overwrite": false, |
| 5532 | "source": "migration_sql.rs:901" |
| 5533 | }, |
| 5534 | "recorded_by": { |
| 5535 | "type": "record<user>", |
| 5536 | "optional": false, |
| 5537 | "default": null, |
| 5538 | "readonly": true, |
| 5539 | "value": null, |
| 5540 | "assert": null, |
| 5541 | "flexible": false, |
| 5542 | "overwrite": false, |
| 5543 | "source": "migration_sql.rs:902" |
| 5544 | }, |
| 5545 | "created_at": { |
| 5546 | "type": "int", |
| 5547 | "optional": false, |
| 5548 | "default": null, |
| 5549 | "readonly": true, |
| 5550 | "value": null, |
| 5551 | "assert": null, |
| 5552 | "flexible": false, |
| 5553 | "overwrite": false, |
| 5554 | "source": "migration_sql.rs:903" |
| 5555 | } |
| 5556 | }, |
| 5557 | "indexes": [ |
| 5558 | { |
| 5559 | "name": "payment_ledger_student", |
| 5560 | "fields": [ |
| 5561 | "student" |
| 5562 | ], |
| 5563 | "unique": false, |
| 5564 | "source": "migration_sql.rs:904" |
| 5565 | }, |
| 5566 | { |
| 5567 | "name": "payment_ledger_source", |
| 5568 | "fields": [ |
| 5569 | "source" |
| 5570 | ], |
| 5571 | "unique": false, |
| 5572 | "source": "migration_sql.rs:905" |
| 5573 | } |
| 5574 | ] |
| 5575 | }, |
| 5576 | "badge_award": { |
| 5577 | "schemafull": true, |
| 5578 | "source": "migration_sql.rs:913", |
| 5579 | "fields": { |
| 5580 | "user": { |
| 5581 | "type": "record<user>", |
| 5582 | "optional": false, |
| 5583 | "default": null, |
| 5584 | "readonly": false, |
| 5585 | "value": null, |
| 5586 | "assert": null, |
| 5587 | "flexible": false, |
| 5588 | "overwrite": false, |
| 5589 | "source": "migration_sql.rs:914" |
| 5590 | }, |
| 5591 | "badge": { |
| 5592 | "type": "string", |
| 5593 | "optional": false, |
| 5594 | "default": null, |
| 5595 | "readonly": false, |
| 5596 | "value": null, |
| 5597 | "assert": null, |
| 5598 | "flexible": false, |
| 5599 | "overwrite": false, |
| 5600 | "source": "migration_sql.rs:915" |
| 5601 | }, |
| 5602 | "earned_at": { |
| 5603 | "type": "option<int>", |
| 5604 | "optional": true, |
| 5605 | "default": null, |
| 5606 | "readonly": false, |
| 5607 | "value": null, |
| 5608 | "assert": null, |
| 5609 | "flexible": false, |
| 5610 | "overwrite": false, |
| 5611 | "source": "migration_sql.rs:916" |
| 5612 | } |
| 5613 | }, |
| 5614 | "indexes": [ |
| 5615 | { |
| 5616 | "name": "badge_award_user", |
| 5617 | "fields": [ |
| 5618 | "user" |
| 5619 | ], |
| 5620 | "unique": false, |
| 5621 | "source": "migration_sql.rs:919" |
| 5622 | } |
| 5623 | ] |
| 5624 | }, |
| 5625 | "kind_ref": { |
| 5626 | "schemafull": true, |
| 5627 | "source": "migration_sql.rs:928", |
| 5628 | "fields": { |
| 5629 | "count": { |
| 5630 | "type": "option<int>", |
| 5631 | "optional": true, |
| 5632 | "default": null, |
| 5633 | "readonly": false, |
| 5634 | "value": null, |
| 5635 | "assert": null, |
| 5636 | "flexible": false, |
| 5637 | "overwrite": false, |
| 5638 | "source": "migration_sql.rs:929" |
| 5639 | }, |
| 5640 | "retired": { |
| 5641 | "type": "option<bool>", |
| 5642 | "optional": true, |
| 5643 | "default": null, |
| 5644 | "readonly": false, |
| 5645 | "value": null, |
| 5646 | "assert": null, |
| 5647 | "flexible": false, |
| 5648 | "overwrite": false, |
| 5649 | "source": "migration_sql.rs:930" |
| 5650 | } |
| 5651 | }, |
| 5652 | "indexes": [] |
| 5653 | }, |
| 5654 | "slot_ref": { |
| 5655 | "schemafull": true, |
| 5656 | "source": "migration_sql.rs:932", |
| 5657 | "fields": { |
| 5658 | "count": { |
| 5659 | "type": "option<int>", |
| 5660 | "optional": true, |
| 5661 | "default": null, |
| 5662 | "readonly": false, |
| 5663 | "value": null, |
| 5664 | "assert": null, |
| 5665 | "flexible": false, |
| 5666 | "overwrite": false, |
| 5667 | "source": "migration_sql.rs:933" |
| 5668 | }, |
| 5669 | "retired": { |
| 5670 | "type": "option<bool>", |
| 5671 | "optional": true, |
| 5672 | "default": null, |
| 5673 | "readonly": false, |
| 5674 | "value": null, |
| 5675 | "assert": null, |
| 5676 | "flexible": false, |
| 5677 | "overwrite": false, |
| 5678 | "source": "migration_sql.rs:934" |
| 5679 | } |
| 5680 | }, |
| 5681 | "indexes": [] |
| 5682 | }, |
| 5683 | "migration_mark": { |
| 5684 | "schemafull": true, |
| 5685 | "source": "migration_sql.rs:956", |
| 5686 | "fields": { |
| 5687 | "done_at": { |
| 5688 | "type": "int", |
| 5689 | "optional": false, |
| 5690 | "default": null, |
| 5691 | "readonly": false, |
| 5692 | "value": null, |
| 5693 | "assert": null, |
| 5694 | "flexible": false, |
| 5695 | "overwrite": false, |
| 5696 | "source": "migration_sql.rs:957" |
| 5697 | }, |
| 5698 | "fingerprint": { |
| 5699 | "type": "option<int>", |
| 5700 | "optional": true, |
| 5701 | "default": null, |
| 5702 | "readonly": false, |
| 5703 | "value": null, |
| 5704 | "assert": null, |
| 5705 | "flexible": false, |
| 5706 | "overwrite": false, |
| 5707 | "source": "migration_sql.rs:958" |
| 5708 | } |
| 5709 | }, |
| 5710 | "indexes": [] |
| 5711 | } |
| 5712 | }, |
| 5713 | "control_tables": { |
| 5714 | "school": { |
| 5715 | "schemafull": true, |
| 5716 | "source": "migration_sql.rs:1475", |
| 5717 | "fields": { |
| 5718 | "slug": { |
| 5719 | "type": "string", |
| 5720 | "optional": false, |
| 5721 | "default": null, |
| 5722 | "readonly": false, |
| 5723 | "value": null, |
| 5724 | "assert": null, |
| 5725 | "flexible": false, |
| 5726 | "overwrite": false, |
| 5727 | "source": "migration_sql.rs:1476" |
| 5728 | }, |
| 5729 | "name": { |
| 5730 | "type": "string", |
| 5731 | "optional": false, |
| 5732 | "default": null, |
| 5733 | "readonly": false, |
| 5734 | "value": null, |
| 5735 | "assert": null, |
| 5736 | "flexible": false, |
| 5737 | "overwrite": false, |
| 5738 | "source": "migration_sql.rs:1477" |
| 5739 | }, |
| 5740 | "status": { |
| 5741 | "type": "string", |
| 5742 | "optional": false, |
| 5743 | "default": null, |
| 5744 | "readonly": false, |
| 5745 | "value": null, |
| 5746 | "assert": null, |
| 5747 | "flexible": false, |
| 5748 | "overwrite": false, |
| 5749 | "source": "migration_sql.rs:1478" |
| 5750 | }, |
| 5751 | "created_at": { |
| 5752 | "type": "int", |
| 5753 | "optional": false, |
| 5754 | "default": null, |
| 5755 | "readonly": false, |
| 5756 | "value": null, |
| 5757 | "assert": null, |
| 5758 | "flexible": false, |
| 5759 | "overwrite": false, |
| 5760 | "source": "migration_sql.rs:1479" |
| 5761 | }, |
| 5762 | "modules": { |
| 5763 | "type": "array<string>", |
| 5764 | "optional": false, |
| 5765 | "default": "[]", |
| 5766 | "readonly": false, |
| 5767 | "value": null, |
| 5768 | "assert": null, |
| 5769 | "flexible": false, |
| 5770 | "overwrite": false, |
| 5771 | "source": "migration_sql.rs:1483" |
| 5772 | } |
| 5773 | }, |
| 5774 | "indexes": [ |
| 5775 | { |
| 5776 | "name": "school_slug", |
| 5777 | "fields": [ |
| 5778 | "slug" |
| 5779 | ], |
| 5780 | "unique": true, |
| 5781 | "source": "migration_sql.rs:1491" |
| 5782 | } |
| 5783 | ] |
| 5784 | }, |
| 5785 | "builder": { |
| 5786 | "schemafull": true, |
| 5787 | "source": "migration_sql.rs:1493", |
| 5788 | "fields": { |
| 5789 | "username": { |
| 5790 | "type": "string", |
| 5791 | "optional": false, |
| 5792 | "default": null, |
| 5793 | "readonly": false, |
| 5794 | "value": null, |
| 5795 | "assert": null, |
| 5796 | "flexible": false, |
| 5797 | "overwrite": false, |
| 5798 | "source": "migration_sql.rs:1494" |
| 5799 | }, |
| 5800 | "password_hash": { |
| 5801 | "type": "string", |
| 5802 | "optional": false, |
| 5803 | "default": null, |
| 5804 | "readonly": false, |
| 5805 | "value": null, |
| 5806 | "assert": null, |
| 5807 | "flexible": false, |
| 5808 | "overwrite": false, |
| 5809 | "source": "migration_sql.rs:1495" |
| 5810 | } |
| 5811 | }, |
| 5812 | "indexes": [ |
| 5813 | { |
| 5814 | "name": "builder_username", |
| 5815 | "fields": [ |
| 5816 | "username" |
| 5817 | ], |
| 5818 | "unique": true, |
| 5819 | "source": "migration_sql.rs:1496" |
| 5820 | } |
| 5821 | ] |
| 5822 | }, |
| 5823 | "builder_session": { |
| 5824 | "schemafull": true, |
| 5825 | "source": "migration_sql.rs:1498", |
| 5826 | "fields": { |
| 5827 | "builder": { |
| 5828 | "type": "record<builder>", |
| 5829 | "optional": false, |
| 5830 | "default": null, |
| 5831 | "readonly": false, |
| 5832 | "value": null, |
| 5833 | "assert": null, |
| 5834 | "flexible": false, |
| 5835 | "overwrite": false, |
| 5836 | "source": "migration_sql.rs:1499" |
| 5837 | }, |
| 5838 | "token": { |
| 5839 | "type": "string", |
| 5840 | "optional": false, |
| 5841 | "default": null, |
| 5842 | "readonly": false, |
| 5843 | "value": null, |
| 5844 | "assert": null, |
| 5845 | "flexible": false, |
| 5846 | "overwrite": false, |
| 5847 | "source": "migration_sql.rs:1500" |
| 5848 | }, |
| 5849 | "created_at": { |
| 5850 | "type": "int", |
| 5851 | "optional": false, |
| 5852 | "default": null, |
| 5853 | "readonly": false, |
| 5854 | "value": null, |
| 5855 | "assert": null, |
| 5856 | "flexible": false, |
| 5857 | "overwrite": false, |
| 5858 | "source": "migration_sql.rs:1501" |
| 5859 | }, |
| 5860 | "expires_at": { |
| 5861 | "type": "int", |
| 5862 | "optional": false, |
| 5863 | "default": null, |
| 5864 | "readonly": false, |
| 5865 | "value": null, |
| 5866 | "assert": null, |
| 5867 | "flexible": false, |
| 5868 | "overwrite": false, |
| 5869 | "source": "migration_sql.rs:1502" |
| 5870 | } |
| 5871 | }, |
| 5872 | "indexes": [ |
| 5873 | { |
| 5874 | "name": "builder_session_token", |
| 5875 | "fields": [ |
| 5876 | "token" |
| 5877 | ], |
| 5878 | "unique": true, |
| 5879 | "source": "migration_sql.rs:1503" |
| 5880 | }, |
| 5881 | { |
| 5882 | "name": "builder_session_expires", |
| 5883 | "fields": [ |
| 5884 | "expires_at" |
| 5885 | ], |
| 5886 | "unique": false, |
| 5887 | "source": "migration_sql.rs:1504" |
| 5888 | } |
| 5889 | ] |
| 5890 | }, |
| 5891 | "rate_limit": { |
| 5892 | "schemafull": true, |
| 5893 | "source": "migration_sql.rs:1507", |
| 5894 | "fields": { |
| 5895 | "hits": { |
| 5896 | "type": "int", |
| 5897 | "optional": false, |
| 5898 | "default": "0", |
| 5899 | "readonly": false, |
| 5900 | "value": null, |
| 5901 | "assert": null, |
| 5902 | "flexible": false, |
| 5903 | "overwrite": false, |
| 5904 | "source": "migration_sql.rs:1508" |
| 5905 | }, |
| 5906 | "window_start": { |
| 5907 | "type": "int", |
| 5908 | "optional": false, |
| 5909 | "default": null, |
| 5910 | "readonly": false, |
| 5911 | "value": null, |
| 5912 | "assert": null, |
| 5913 | "flexible": false, |
| 5914 | "overwrite": false, |
| 5915 | "source": "migration_sql.rs:1509" |
| 5916 | } |
| 5917 | }, |
| 5918 | "indexes": [] |
| 5919 | } |
| 5920 | }, |
| 5921 | "id_rules": { |
| 5922 | "user": { |
| 5923 | "strategy": "ulid_monotonic", |
| 5924 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5925 | "source": "domain/user.rs:32" |
| 5926 | }, |
| 5927 | "session": { |
| 5928 | "strategy": "ulid_random", |
| 5929 | "note": "ulid::Ulid::new() - random low 80 bits", |
| 5930 | "source": "domain/session.rs:14" |
| 5931 | }, |
| 5932 | "note": { |
| 5933 | "strategy": "ulid_monotonic", |
| 5934 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5935 | "source": "domain/note.rs:17" |
| 5936 | }, |
| 5937 | "note_file": { |
| 5938 | "strategy": "ulid_monotonic", |
| 5939 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5940 | "source": "domain/note_file.rs:24" |
| 5941 | }, |
| 5942 | "message": { |
| 5943 | "strategy": "ulid_monotonic", |
| 5944 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5945 | "source": "domain/message.rs:108" |
| 5946 | }, |
| 5947 | "board": { |
| 5948 | "strategy": "ulid_monotonic", |
| 5949 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5950 | "source": "domain/board.rs:31" |
| 5951 | }, |
| 5952 | "board_stroke": { |
| 5953 | "strategy": "ulid_monotonic", |
| 5954 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5955 | "source": "domain/board_stroke.rs:69" |
| 5956 | }, |
| 5957 | "course_note": { |
| 5958 | "strategy": "ulid_monotonic", |
| 5959 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5960 | "source": "domain/course_note.rs:19" |
| 5961 | }, |
| 5962 | "course_note_file": { |
| 5963 | "strategy": "ulid_monotonic", |
| 5964 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5965 | "source": "domain/course_note_file.rs:28" |
| 5966 | }, |
| 5967 | "rag_output": { |
| 5968 | "strategy": "ulid_monotonic", |
| 5969 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5970 | "source": "domain/rag_output.rs:34" |
| 5971 | }, |
| 5972 | "chatbot_thread": { |
| 5973 | "strategy": "ulid_monotonic", |
| 5974 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5975 | "source": "domain/chatbot_thread.rs:25" |
| 5976 | }, |
| 5977 | "chatbot_message": { |
| 5978 | "strategy": "ulid_monotonic_local", |
| 5979 | "note": "file-local LazyLock<Mutex<Generator>>; semantics identical to next_ulid", |
| 5980 | "source": "domain/chatbot_message.rs:47" |
| 5981 | }, |
| 5982 | "rate_limit": { |
| 5983 | "strategy": "deterministic_opaque", |
| 5984 | "source": "migration_sql.rs:268", |
| 5985 | "note": "one row per tier+client+window, built in crate::rate_limit. NOT seed-relevant." |
| 5986 | }, |
| 5987 | "event": { |
| 5988 | "strategy": "ulid_monotonic", |
| 5989 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 5990 | "source": "domain/event.rs:23" |
| 5991 | }, |
| 5992 | "attendance": { |
| 5993 | "strategy": "composite", |
| 5994 | "pattern": "{event_key}_{user_key}", |
| 5995 | "source": "domain/attendance.rs:17-20", |
| 5996 | "note": "" |
| 5997 | }, |
| 5998 | "registration": { |
| 5999 | "strategy": "composite", |
| 6000 | "pattern": "{event_key}_{user_key}", |
| 6001 | "source": "domain/registration.rs:16-19", |
| 6002 | "note": "" |
| 6003 | }, |
| 6004 | "term": { |
| 6005 | "strategy": "ulid_monotonic", |
| 6006 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6007 | "source": "domain/term.rs:26" |
| 6008 | }, |
| 6009 | "course": { |
| 6010 | "strategy": "ulid_monotonic", |
| 6011 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6012 | "source": "domain/course.rs:18" |
| 6013 | }, |
| 6014 | "subject": { |
| 6015 | "strategy": "ulid_monotonic", |
| 6016 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6017 | "source": "domain/subject.rs:18" |
| 6018 | }, |
| 6019 | "class_group": { |
| 6020 | "strategy": "ulid_monotonic", |
| 6021 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6022 | "source": "domain/class_group.rs:31" |
| 6023 | }, |
| 6024 | "class_blueprint": { |
| 6025 | "strategy": "natural_key", |
| 6026 | "pattern": "{grade}", |
| 6027 | "source": "domain/class_blueprint.rs:41", |
| 6028 | "note": "the grade label IS the record key -> one blueprint per grade, by construction" |
| 6029 | }, |
| 6030 | "class_member": { |
| 6031 | "strategy": "composite", |
| 6032 | "pattern": "{class_key}_{user_key}", |
| 6033 | "source": "domain/class_member.rs:24 -> db/class_pump.rs:676", |
| 6034 | "note": "" |
| 6035 | }, |
| 6036 | "class_course": { |
| 6037 | "strategy": "composite", |
| 6038 | "pattern": "{class_key}_{course_key}", |
| 6039 | "source": "domain/class_course.rs:27 -> db/class_pump.rs:676", |
| 6040 | "note": "" |
| 6041 | }, |
| 6042 | "enrollment": { |
| 6043 | "strategy": "composite", |
| 6044 | "pattern": "{course_key}_{user_key}", |
| 6045 | "source": "domain/enrollment.rs:17-20", |
| 6046 | "note": "" |
| 6047 | }, |
| 6048 | "parent_link": { |
| 6049 | "strategy": "composite", |
| 6050 | "pattern": "{parent_key}_{student_key}", |
| 6051 | "source": "domain/parent_link.rs:15-18", |
| 6052 | "note": "" |
| 6053 | }, |
| 6054 | "course_session": { |
| 6055 | "strategy": "ulid_monotonic", |
| 6056 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6057 | "source": "domain/course_session.rs:20" |
| 6058 | }, |
| 6059 | "session_attendance": { |
| 6060 | "strategy": "composite", |
| 6061 | "pattern": "{course_session_key}_{user_key}", |
| 6062 | "source": "domain/session_attendance.rs:18-21", |
| 6063 | "note": "" |
| 6064 | }, |
| 6065 | "work_entry": { |
| 6066 | "strategy": "composite", |
| 6067 | "pattern": "open_{user_key} (WHILE OPEN) | <monotonic ULID> (once closed)", |
| 6068 | "source": "domain/work_entry.rs:28 (closed) / domain/work_entry.rs:37-40 (open)", |
| 6069 | "note": "CRITICAL: an in-progress work entry lives at the fixed id open_<user ULID>; closing it moves the row to a fresh ULID id." |
| 6070 | }, |
| 6071 | "pomodoro_session": { |
| 6072 | "strategy": "composite", |
| 6073 | "pattern": "open_{user_key} (WHILE OPEN) | <monotonic ULID> (once closed)", |
| 6074 | "source": "domain/pomodoro.rs:17-20 (closed) / domain/pomodoro.rs:29-32 (open)", |
| 6075 | "note": "same open_/closed split as work_entry" |
| 6076 | }, |
| 6077 | "exam": { |
| 6078 | "strategy": "ulid_monotonic", |
| 6079 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6080 | "source": "domain/exam.rs:35" |
| 6081 | }, |
| 6082 | "exam_attempt": { |
| 6083 | "strategy": "composite", |
| 6084 | "pattern": "{exam_key}_{user_key} (seq==1) | {exam_key}_{user_key}_{seq} (seq>1)", |
| 6085 | "source": "domain/exam_attempt.rs:19 -> domain/key.rs:16", |
| 6086 | "note": "the bare seq==1 form is migration law - do not number the first sitting" |
| 6087 | }, |
| 6088 | "exam_question": { |
| 6089 | "strategy": "ulid_monotonic", |
| 6090 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6091 | "source": "domain/exam_question.rs:25" |
| 6092 | }, |
| 6093 | "exam_question.choices[*].id": { |
| 6094 | "strategy": "ulid_random", |
| 6095 | "note": "embedded choice id: deliberately random Ulid::new(), choices are ordered by position not id", |
| 6096 | "source": "domain/exam_question.rs:122" |
| 6097 | }, |
| 6098 | "question_image": { |
| 6099 | "strategy": "composite", |
| 6100 | "pattern": "{exam_question_key}_q (question illustration) | {exam_question_key}_{choice_id}", |
| 6101 | "source": "domain/question_image.rs:29-32 -> domain/key.rs:30", |
| 6102 | "note": "" |
| 6103 | }, |
| 6104 | "bank_question": { |
| 6105 | "strategy": "ulid_monotonic", |
| 6106 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6107 | "source": "domain/bank_question.rs:73" |
| 6108 | }, |
| 6109 | "bank_question_image": { |
| 6110 | "strategy": "composite", |
| 6111 | "pattern": "{bank_question_key}_q | {bank_question_key}_{choice_id}", |
| 6112 | "source": "domain/bank_question_image.rs:30-33 -> domain/key.rs:30", |
| 6113 | "note": "" |
| 6114 | }, |
| 6115 | "exam_answer": { |
| 6116 | "strategy": "composite", |
| 6117 | "pattern": "{exam_question_key}_{user_key} (seq==1) | {exam_question_key}_{user_key}_{seq}", |
| 6118 | "source": "domain/exam_answer.rs:22 -> domain/key.rs:16", |
| 6119 | "note": "" |
| 6120 | }, |
| 6121 | "answer_image": { |
| 6122 | "strategy": "composite", |
| 6123 | "pattern": "{exam_question_key}_{user_key} (seq==1) | {exam_question_key}_{user_key}_{seq}", |
| 6124 | "source": "domain/answer_image.rs:34 -> domain/key.rs:16", |
| 6125 | "note": "" |
| 6126 | }, |
| 6127 | "exam_result": { |
| 6128 | "strategy": "composite", |
| 6129 | "pattern": "{exam_key}_{user_key} (seq==1) | {exam_key}_{user_key}_{seq}", |
| 6130 | "source": "domain/exam_result.rs:48 -> domain/key.rs:16", |
| 6131 | "note": "" |
| 6132 | }, |
| 6133 | "pool_question": { |
| 6134 | "strategy": "ulid_monotonic", |
| 6135 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6136 | "source": "domain/pool_question.rs:36" |
| 6137 | }, |
| 6138 | "solution": { |
| 6139 | "strategy": "ulid_monotonic", |
| 6140 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6141 | "source": "domain/solution.rs:31" |
| 6142 | }, |
| 6143 | "settings": { |
| 6144 | "strategy": "fixed", |
| 6145 | "id": "settings:school", |
| 6146 | "source": "domain/settings.rs:239-241 (SETTINGS_TABLE constant.rs:893, SETTINGS_KEY constant.rs:805)", |
| 6147 | "note": "singleton. An absent row reads as the built-in defaults, so seeding it is OPTIONAL - but required if you want non-default exam_kinds / meal_slots / dietary_tags." |
| 6148 | }, |
| 6149 | "homework": { |
| 6150 | "strategy": "ulid_monotonic", |
| 6151 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6152 | "source": "domain/homework.rs:34" |
| 6153 | }, |
| 6154 | "homework_submission": { |
| 6155 | "strategy": "composite", |
| 6156 | "pattern": "{homework_key}_{user_key}", |
| 6157 | "source": "domain/homework_submission.rs:35-38", |
| 6158 | "note": "" |
| 6159 | }, |
| 6160 | "homework_file": { |
| 6161 | "strategy": "ulid_monotonic", |
| 6162 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6163 | "source": "domain/homework_file.rs:30" |
| 6164 | }, |
| 6165 | "homework_result": { |
| 6166 | "strategy": "composite", |
| 6167 | "pattern": "{homework_key}_{user_key}", |
| 6168 | "source": "domain/homework_result.rs:34-39", |
| 6169 | "note": "shares its key with homework_submission - that is how graded_by_result is addressed without a search" |
| 6170 | }, |
| 6171 | "appointment_slot": { |
| 6172 | "strategy": "ulid_monotonic", |
| 6173 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6174 | "source": "domain/appointment_slot.rs:41-44" |
| 6175 | }, |
| 6176 | "appointment_slot.series": { |
| 6177 | "strategy": "ulid_monotonic", |
| 6178 | "note": "a bare ULID STRING (option<string> column), not a record link", |
| 6179 | "source": "domain/appointment_slot.rs:70" |
| 6180 | }, |
| 6181 | "appointment": { |
| 6182 | "strategy": "ulid_monotonic_local", |
| 6183 | "note": "file-local LazyLock<Mutex<Generator>>; semantics identical to next_ulid", |
| 6184 | "source": "domain/appointment.rs:67-72" |
| 6185 | }, |
| 6186 | "menu": { |
| 6187 | "strategy": "natural_key", |
| 6188 | "pattern": "{date}_{slot} e.g. 2026-09-01_lunch", |
| 6189 | "source": "domain/menu.rs:44-49", |
| 6190 | "note": "date is YYYY-MM-DD text; slot text may not contain / \\ ? # % (domain/menu.rs:138-164). Matches UNIQUE index menu_date_slot." |
| 6191 | }, |
| 6192 | "menu_dish": { |
| 6193 | "strategy": "ulid_monotonic_local", |
| 6194 | "note": "file-local LazyLock<Mutex<Generator>>; semantics identical to next_ulid", |
| 6195 | "source": "domain/menu_dish.rs:38-44" |
| 6196 | }, |
| 6197 | "dietary_profile": { |
| 6198 | "strategy": "natural_key", |
| 6199 | "pattern": "{student_key}", |
| 6200 | "source": "domain/dietary_profile.rs:31", |
| 6201 | "note": "" |
| 6202 | }, |
| 6203 | "meal_booking": { |
| 6204 | "strategy": "composite", |
| 6205 | "pattern": "{menu_key}_{student_key} -> {date}_{slot}_{student_ulid}", |
| 6206 | "source": "domain/meal_booking.rs:57-60", |
| 6207 | "note": "" |
| 6208 | }, |
| 6209 | "meal_attendance": { |
| 6210 | "strategy": "composite", |
| 6211 | "pattern": "{menu_key}_{student_key}", |
| 6212 | "source": "domain/meal_attendance.rs:37-40", |
| 6213 | "note": "" |
| 6214 | }, |
| 6215 | "meal_ledger": { |
| 6216 | "strategy": "composite", |
| 6217 | "pattern": "{booking_key}_c{attempt} (charge) | {booking_key}_r{attempt} (reversal) | {student_key}_k_{request_key} (idempotent credit) | <local ULID> (free credit)", |
| 6218 | "source": "domain/meal_ledger.rs:87-137", |
| 6219 | "note": "marker chars: c=charge, r=reversal, k=credit" |
| 6220 | }, |
| 6221 | "fee_plan": { |
| 6222 | "strategy": "ulid_monotonic", |
| 6223 | "note": "domain::monotonic_id::next_ulid() - ms-monotonic ULID, 26 chars Crockford base32", |
| 6224 | "source": "domain/fee_plan.rs:32" |
| 6225 | }, |
| 6226 | "fee_plan_assignment": { |
| 6227 | "strategy": "composite", |
| 6228 | "pattern": "{fee_plan_key}_{student_key}", |
| 6229 | "source": "domain/fee_plan_assignment.rs:34-38", |
| 6230 | "note": "" |
| 6231 | }, |
| 6232 | "payment_ledger": { |
| 6233 | "strategy": "composite", |
| 6234 | "pattern": "{assignment_key}_c{n} (charge, n 1-based) | {line_key}_r (reversal) | {line_key}_k_{request_key} (payment) | {line_key}_kr_{request_key} (refund) | <monotonic ULID> (free)", |
| 6235 | "source": "domain/payment_ledger.rs:66-116", |
| 6236 | "note": "'_' may never appear inside a request_key; ULID keys are [0-9A-Z] only, so the grammar parses uniquely" |
| 6237 | }, |
| 6238 | "badge_award": { |
| 6239 | "strategy": "composite", |
| 6240 | "pattern": "{user_key}_{badge_id}", |
| 6241 | "source": "db/badge.rs:94-96", |
| 6242 | "note": "badge_id from the 34-entry BADGES catalog, constant.rs:1095" |
| 6243 | }, |
| 6244 | "kind_ref": { |
| 6245 | "strategy": "natural_key", |
| 6246 | "pattern": "{exam_kind_name}", |
| 6247 | "source": "domain/exam_result.rs:25-27 / db/cap.rs:681", |
| 6248 | "note": "kind_ref:quiz - one row per exam-kind NAME, created by the first claim" |
| 6249 | }, |
| 6250 | "slot_ref": { |
| 6251 | "strategy": "natural_key", |
| 6252 | "pattern": "{meal_slot_name}", |
| 6253 | "source": "domain/menu.rs:30-32 / db/menu.rs:126", |
| 6254 | "note": "slot_ref:lunch - one row per meal-slot NAME" |
| 6255 | }, |
| 6256 | "migration_mark": { |
| 6257 | "strategy": "fixed", |
| 6258 | "id": "migration_mark:board_roster , migration_mark:profile_counters", |
| 6259 | "source": "migration_sql.rs:1354,1432", |
| 6260 | "note": "written by migrate(). Do NOT seed these unless you deliberately want to suppress the one-time backfills." |
| 6261 | }, |
| 6262 | "_control_school": { |
| 6263 | "strategy": "natural_key", |
| 6264 | "pattern": "{slug}", |
| 6265 | "source": "tenant.rs:151-153", |
| 6266 | "note": "CONTROL DB: school:<slug>, the id IS the slug" |
| 6267 | }, |
| 6268 | "_control_builder": { |
| 6269 | "strategy": "ulid_random", |
| 6270 | "note": "ulid::Ulid::new() - random low 80 bits", |
| 6271 | "source": "domain/builder.rs:27" |
| 6272 | }, |
| 6273 | "_control_builder_session": { |
| 6274 | "strategy": "ulid_random", |
| 6275 | "note": "ulid::Ulid::new() - random low 80 bits", |
| 6276 | "source": "db/builder.rs:44" |
| 6277 | }, |
| 6278 | "_user_ai_principal": { |
| 6279 | "strategy": "fixed", |
| 6280 | "id": "user:ai_service", |
| 6281 | "source": "constant.rs:762", |
| 6282 | "note": "AI_PRINCIPAL_KEY - a reserved literal; the row is NEVER written. Never seed it." |
| 6283 | } |
| 6284 | }, |
| 6285 | "id_syntax": { |
| 6286 | "recommended_literal": "table:⟨key⟩ (U+27E8 LEFT / U+27E9 RIGHT ANGLE BRACKET)", |
| 6287 | "equivalent_literal": "table:`key` (backticks)", |
| 6288 | "bulletproof_function": "type::record('table', 'key')", |
| 6289 | "why": "Every minted key is a 26-char Crockford-base32 ULID, or a composite that starts with one, so it BEGINS WITH A DIGIT and is not a safe bare identifier in SurrealQL.", |
| 6290 | "evidence": [ |
| 6291 | "The codebase NEVER spells a ULID id into SQL text: ids are bound as surrealdb::types::RecordId parameters, e.g. db/enrollment.rs:96 'CREATE $id CONTENT $row'.", |
| 6292 | "type::record(...) is used whenever the key is computed inside a query: db/badge.rs:122, db/class_pump.rs:436, db/course.rs:312, migration_sql.rs:996/1167/1265/1269.", |
| 6293 | "Literal table:key appears ONLY for known-safe keys: migration_mark:board_roster (migration_sql.rs:1354), settings:school (db/chatbot_thread.rs:123), and in unit tests with hand-written keys like user:t.", |
| 6294 | "Backticks are used in this codebase for DATABASE NAMES only (tenant.rs:109-111), never for record ids - the comment there explains that an unquoted 2024school parses as a duration and 12345 as a number in SurrealDB 3.2." |
| 6295 | ], |
| 6296 | "unverified": "Whether SurrealDB 3.2 happens to accept a bare digit-leading alphanumeric record id was not executed. Always wrap.", |
| 6297 | "ulid_time_consistency": { |
| 6298 | "derivable": "A ULID's first 10 characters encode its mint time in ms (Crockford base32). Nothing in the code DERIVES time from an id.", |
| 6299 | "but": "Several listings ORDER BY id and document that as 'newest first' (domain/monotonic_id.rs header, class_member.rs:44, class_course.rs:55).", |
| 6300 | "seed_rule": "Generate each row's ULID FROM its own created_at / *_at millisecond value, so id order and time order agree. Otherwise every 'newest first' list in the UI is scrambled." |
| 6301 | } |
| 6302 | }, |
| 6303 | "counters": { |
| 6304 | "course.enrollment_count": { |
| 6305 | "counts": "enrollment", |
| 6306 | "where": "course = <this course>", |
| 6307 | "cap": "course.capacity ?? unlimited", |
| 6308 | "writes": [ |
| 6309 | "db/enrollment.rs:91 (+1)", |
| 6310 | "db/enrollment.rs:232 (-1)", |
| 6311 | "db/class_pump.rs:442 (+1 class pump)", |
| 6312 | "db/class_pump.rs:628 (-1 detach)", |
| 6313 | "db/user.rs:307 (-1 delete/demote)" |
| 6314 | ], |
| 6315 | "delete_guard": "db/course.rs:301 (enrollment_count ?? 0) = 0", |
| 6316 | "recomputed_every_boot": true, |
| 6317 | "recompute_source": "migration_sql.rs:1068 + 1181" |
| 6318 | }, |
| 6319 | "term.course_count": { |
| 6320 | "counts": "course", |
| 6321 | "where": "term = <this term>", |
| 6322 | "writes": [ |
| 6323 | "db/course.rs:51 (+1)", |
| 6324 | "db/course.rs:171 (move)", |
| 6325 | "db/course.rs:305 (-1)" |
| 6326 | ], |
| 6327 | "delete_guard": "db/term.rs:85 (course_count ?? 0) = 0 AND (class_count ?? 0) = 0", |
| 6328 | "seed": "migration_sql.rs:1189" |
| 6329 | }, |
| 6330 | "term.class_count": { |
| 6331 | "counts": "class_group", |
| 6332 | "where": "term = <this term>", |
| 6333 | "writes": [ |
| 6334 | "db/class_group.rs:49 (+1)", |
| 6335 | "db/class_group.rs:129 (move)", |
| 6336 | "db/class_group.rs:204 (-1)" |
| 6337 | ], |
| 6338 | "delete_guard": "db/term.rs:85", |
| 6339 | "seed": null, |
| 6340 | "note": "NO backfill seed - seed data must write it itself" |
| 6341 | }, |
| 6342 | "subject.exam_question_count": { |
| 6343 | "counts": "exam_question", |
| 6344 | "where": "subject = <this subject>", |
| 6345 | "writes": [ |
| 6346 | "db/exam_question.rs:110 (+1)", |
| 6347 | "db/exam_question.rs:255 (retag +-1)", |
| 6348 | "db/exam_question.rs:370 (-1)" |
| 6349 | ], |
| 6350 | "seed": "migration_sql.rs:1241" |
| 6351 | }, |
| 6352 | "subject.homework_count": { |
| 6353 | "counts": "homework", |
| 6354 | "where": "subject = <this subject>", |
| 6355 | "writes": [ |
| 6356 | "db/homework.rs:66 (+1)", |
| 6357 | "db/homework.rs:198 (move)", |
| 6358 | "db/homework.rs:225 (-1)" |
| 6359 | ], |
| 6360 | "seed": "migration_sql.rs:1245" |
| 6361 | }, |
| 6362 | "class_group.class_member_count": { |
| 6363 | "counts": "class_member", |
| 6364 | "where": "class = <this class>", |
| 6365 | "cap": "MAX_CLASS_MEMBERS = 200", |
| 6366 | "writes": [ |
| 6367 | "db/class_pump.rs:427 (+1)", |
| 6368 | "db/user.rs:299 (-1)" |
| 6369 | ], |
| 6370 | "delete_guard": "db/class_group.rs:199 both counters zero", |
| 6371 | "seed": null |
| 6372 | }, |
| 6373 | "class_group.class_course_count": { |
| 6374 | "counts": "class_course", |
| 6375 | "where": "class = <this class>", |
| 6376 | "cap": "MAX_CLASS_COURSES = 50", |
| 6377 | "writes": [ |
| 6378 | "db/class_pump.rs:427 (+1)", |
| 6379 | "db/course.rs:328 (-1)" |
| 6380 | ], |
| 6381 | "delete_guard": "db/class_group.rs:199", |
| 6382 | "seed": null |
| 6383 | }, |
| 6384 | "exam.result_count": { |
| 6385 | "counts": "exam_result", |
| 6386 | "where": "exam = <this exam> (ALL seq values)", |
| 6387 | "writes": [ |
| 6388 | "db/exam_result.rs:146 (+1, only when the sitting had no mark)", |
| 6389 | "db/exam_result.rs:309 (-len(gone))" |
| 6390 | ], |
| 6391 | "seed": "migration_sql.rs:1276" |
| 6392 | }, |
| 6393 | "event.registration_count": { |
| 6394 | "counts": "registration", |
| 6395 | "where": "event = <this event>", |
| 6396 | "cap": "event.audience.capacity ?? unlimited (read live)", |
| 6397 | "writes": [ |
| 6398 | "service/registration.rs:56 (+1)", |
| 6399 | "db/registration.rs:46 (-1)", |
| 6400 | "db/user.rs:326 (-n)" |
| 6401 | ], |
| 6402 | "seed": "migration_sql.rs:1194" |
| 6403 | }, |
| 6404 | "note.file_count": { |
| 6405 | "counts": "note_file", |
| 6406 | "where": "note = <this note>", |
| 6407 | "cap": "MAX_NOTE_FILES = 10", |
| 6408 | "writes": [ |
| 6409 | "db/note_file.rs:23 (+1)", |
| 6410 | "db/note_file.rs:75 (-1)" |
| 6411 | ], |
| 6412 | "seed": "migration_sql.rs:1199" |
| 6413 | }, |
| 6414 | "course_note.file_count": { |
| 6415 | "counts": "course_note_file", |
| 6416 | "where": "course_note = <this note>", |
| 6417 | "cap": "MAX_COURSE_NOTE_FILES = 10", |
| 6418 | "writes": [ |
| 6419 | "db/course_note_file.rs:22 (+1)", |
| 6420 | "db/course_note_file.rs:115 (-1)" |
| 6421 | ], |
| 6422 | "seed": null, |
| 6423 | "note": "NO backfill seed" |
| 6424 | }, |
| 6425 | "homework_submission.file_count": { |
| 6426 | "counts": "homework_file", |
| 6427 | "where": "submission = <this submission>", |
| 6428 | "cap": "MAX_HOMEWORK_FILES_PER_SUBMISSION = 10 AND graded_by_result = NONE", |
| 6429 | "writes": [ |
| 6430 | "db/homework_file.rs:44 (+1)", |
| 6431 | "db/homework_file.rs:192 (-1)" |
| 6432 | ], |
| 6433 | "seed": "migration_sql.rs:1204" |
| 6434 | }, |
| 6435 | "menu.seats_booked": { |
| 6436 | "counts": "meal_booking", |
| 6437 | "where": "menu = <this menu> AND status = 'booked' (cancelled rows EXCLUDED)", |
| 6438 | "cap": "menu.capacity", |
| 6439 | "writes": [ |
| 6440 | "db/meal_booking.rs:128 (+1, fenced on version)", |
| 6441 | "db/meal_booking.rs:272 (-n)" |
| 6442 | ], |
| 6443 | "delete_guard": "db/menu.rs:250 (seats_booked ?? 0) = 0", |
| 6444 | "seed": "migration_sql.rs:1226" |
| 6445 | }, |
| 6446 | "menu.version": { |
| 6447 | "counts": null, |
| 6448 | "where": "NOT a row count - monotonic revision. Starts 0, +1 on every price / capacity / dish change.", |
| 6449 | "writes": [ |
| 6450 | "db/menu.rs:121 (init 0)", |
| 6451 | "db/menu.rs:196", |
| 6452 | "db/menu.rs:64", |
| 6453 | "db/menu_dish.rs:53" |
| 6454 | ], |
| 6455 | "seed": null, |
| 6456 | "note": "absent reads as 0 everywhere it is compared; migration deliberately gives it no pass" |
| 6457 | }, |
| 6458 | "appointment_slot.occupied": { |
| 6459 | "counts": "appointment", |
| 6460 | "where": "slot = <this slot> AND status IN ['pending','approved']", |
| 6461 | "cap": "1", |
| 6462 | "writes": [ |
| 6463 | "service/appointment.rs:115 (+1)", |
| 6464 | "db/appointment.rs:176 (-1)" |
| 6465 | ], |
| 6466 | "delete_guard": "db/appointment_slot.rs:222 (occupied ?? 0) = 0", |
| 6467 | "seed": "migration_sql.rs:1214" |
| 6468 | }, |
| 6469 | "user.chatbot_thread_count": { |
| 6470 | "counts": "chatbot_thread", |
| 6471 | "where": "user_id = <this user>", |
| 6472 | "cap": "settings.max_chatbot_threads ?? 50 (read live)", |
| 6473 | "writes": [ |
| 6474 | "db/chatbot_thread.rs:119 (+1)", |
| 6475 | "db/chatbot_thread.rs:235 (-n)" |
| 6476 | ], |
| 6477 | "seed": "migration_sql.rs:1209" |
| 6478 | }, |
| 6479 | "user.board_count": { |
| 6480 | "counts": "board", |
| 6481 | "where": "creator = <this user>", |
| 6482 | "cap": "MAX_BOARDS_PER_CREATOR = 200", |
| 6483 | "writes": [ |
| 6484 | "db/board.rs:37 (+1)", |
| 6485 | "db/board.rs:187 (-n)", |
| 6486 | "db/user.rs:341 (user delete)" |
| 6487 | ], |
| 6488 | "seed": null, |
| 6489 | "note": "MAINTAINED but has NO backfill seed anywhere - seed data MUST set it itself" |
| 6490 | }, |
| 6491 | "board.epoch": { |
| 6492 | "counts": null, |
| 6493 | "where": "monotonic epoch index, DEFAULT 0, +1 on every clear", |
| 6494 | "writes": [ |
| 6495 | "db/board_stroke.rs:158" |
| 6496 | ], |
| 6497 | "seed": null, |
| 6498 | "note": "no backfill - seed data must write it" |
| 6499 | }, |
| 6500 | "board.epoch_stroke_count": { |
| 6501 | "counts": "board_stroke", |
| 6502 | "where": "board = <this board> AND epoch = board.epoch", |
| 6503 | "cap": "MAX_EPOCH_STROKES = 5000", |
| 6504 | "writes": [ |
| 6505 | "db/board_stroke.rs:58 (+1)", |
| 6506 | "db/board_stroke.rs:158 (reset to 0 on clear)" |
| 6507 | ], |
| 6508 | "seed": null, |
| 6509 | "note": "no backfill - seed data must write it" |
| 6510 | }, |
| 6511 | "board.total_stroke_count": { |
| 6512 | "counts": "board_stroke", |
| 6513 | "where": "board = <this board> (ALL rows, clear markers INCLUDED)", |
| 6514 | "cap": "MAX_BOARD_STROKES = 50000", |
| 6515 | "writes": [ |
| 6516 | "db/board_stroke.rs:58 (+1)", |
| 6517 | "db/board_stroke.rs:158 (+1 for the clear marker itself)" |
| 6518 | ], |
| 6519 | "recomputed_every_boot": true, |
| 6520 | "recompute_source": "migration_sql.rs:1311" |
| 6521 | }, |
| 6522 | "kind_ref.count": { |
| 6523 | "counts": "exam_result", |
| 6524 | "where": "exam.kind = <the row id>", |
| 6525 | "writes": [ |
| 6526 | "db/exam_result.rs:143 (+1)", |
| 6527 | "db/exam_result.rs:307 (-n)", |
| 6528 | "db/course.rs:312 (-n)" |
| 6529 | ], |
| 6530 | "seed": "migration_sql.rs:1265", |
| 6531 | "note": "row id IS the exam-kind name. Gates whether that kind can be removed from settings." |
| 6532 | }, |
| 6533 | "slot_ref.count": { |
| 6534 | "counts": "menu", |
| 6535 | "where": "slot = <the row id>", |
| 6536 | "writes": [ |
| 6537 | "db/menu.rs:126 (+1)", |
| 6538 | "db/menu.rs:252 (-1)" |
| 6539 | ], |
| 6540 | "seed": "migration_sql.rs:1270", |
| 6541 | "note": "row id IS the meal-slot name" |
| 6542 | }, |
| 6543 | "kind_ref.retired / slot_ref.retired": { |
| 6544 | "counts": null, |
| 6545 | "where": "a bit, not a count. Flipped true by cap::retire_name only while (count ?? 0) = 0.", |
| 6546 | "writes": [ |
| 6547 | "db/cap.rs:765", |
| 6548 | "db/cap.rs:788" |
| 6549 | ], |
| 6550 | "seed": null |
| 6551 | }, |
| 6552 | "fee_plan.assignment_count": { |
| 6553 | "counts": "fee_plan_assignment", |
| 6554 | "where": "plan = <this plan>", |
| 6555 | "writes": [ |
| 6556 | "service/fee_plan_assignment.rs:64 (+1)" |
| 6557 | ], |
| 6558 | "seed": "migration_sql.rs:1296", |
| 6559 | "note": "MONOTONIC - no decrement path exists (there is no unassign route). Non-zero freezes edit+delete of the plan." |
| 6560 | }, |
| 6561 | "user.homework_submitted_total": { |
| 6562 | "counts": "homework_submission", |
| 6563 | "where": "user = <this user>", |
| 6564 | "writes": [ |
| 6565 | "db/homework_submission.rs:110 (+1 on first hand-in)", |
| 6566 | "db/homework_submission.rs:262 (-1)" |
| 6567 | ], |
| 6568 | "badge_stat": "homework_submitted", |
| 6569 | "seeded_once": "migration_mark:profile_counters (migration_sql.rs:1437)" |
| 6570 | }, |
| 6571 | "user.homework_on_time_total": { |
| 6572 | "counts": "homework_submission", |
| 6573 | "where": "user = <this user> AND counted_on_time = true (i.e. submitted_at <= homework.due_at)", |
| 6574 | "writes": [ |
| 6575 | "db/homework_submission.rs:111", |
| 6576 | "db/homework_submission.rs:264" |
| 6577 | ], |
| 6578 | "badge_stat": "homework_on_time", |
| 6579 | "seeded_once": "migration_mark:profile_counters (migration_sql.rs:1440)" |
| 6580 | }, |
| 6581 | "user.exam_sat_total": { |
| 6582 | "counts": "exam_attempt", |
| 6583 | "where": "user = <this user> AND (seq ?? 1) = 1 (one per exam - a retake credits nothing)", |
| 6584 | "writes": [ |
| 6585 | "service/exam_attempt.rs:208" |
| 6586 | ], |
| 6587 | "badge_stat": "exam_sat", |
| 6588 | "seeded_once": "migration_mark:profile_counters (migration_sql.rs:1449)" |
| 6589 | }, |
| 6590 | "user.pomodoro_finished_total": { |
| 6591 | "counts": "pomodoro_session", |
| 6592 | "where": "user = <this user> AND counted = true (>= MIN_COUNTED_POMODORO_MS 300000 and within MAX_COUNTED_POMODORO_PER_DAY 16)", |
| 6593 | "writes": [ |
| 6594 | "db/pomodoro.rs:165" |
| 6595 | ], |
| 6596 | "badge_stat": "pomodoro_finished", |
| 6597 | "seeded_once": "migration_mark:profile_counters (migration_sql.rs:1453) - the SEED counts finished_at != NONE, which is looser than the live rule" |
| 6598 | }, |
| 6599 | "user.pomodoro_focus_ms_total": { |
| 6600 | "counts": "pomodoro_session", |
| 6601 | "where": "sum over counted stints of max(finished_at - started_at, 0)", |
| 6602 | "writes": [ |
| 6603 | "db/pomodoro.rs:167" |
| 6604 | ], |
| 6605 | "badge_stat": "pomodoro_focus_ms", |
| 6606 | "seeded_once": "migration_mark:profile_counters" |
| 6607 | }, |
| 6608 | "user.marks_given_total": { |
| 6609 | "counts": "exam_result + homework_result", |
| 6610 | "where": "graded_by = <this user>, SUMMED ACROSS BOTH TABLES", |
| 6611 | "writes": [ |
| 6612 | "db/exam_result.rs:148 (+1)", |
| 6613 | "db/homework_result.rs:118 (+1)", |
| 6614 | "db/exam_result.rs:318 (-1)", |
| 6615 | "db/homework_result.rs:236 (-1)" |
| 6616 | ], |
| 6617 | "badge_stat": "marks_given", |
| 6618 | "seeded_once": null, |
| 6619 | "note": "NO backfill seed" |
| 6620 | }, |
| 6621 | "user.lessons_held_total": { |
| 6622 | "counts": "course_session", |
| 6623 | "where": "teacher = <this user> AND held_counted_at != NONE", |
| 6624 | "writes": [ |
| 6625 | "db/session_attendance.rs:148" |
| 6626 | ], |
| 6627 | "badge_stat": "lessons_held", |
| 6628 | "seeded_once": null |
| 6629 | }, |
| 6630 | "user.pool_approved_total": { |
| 6631 | "counts": "pool_question", |
| 6632 | "where": "approved_by = <this user> AND asker != <this user>", |
| 6633 | "writes": [ |
| 6634 | "db/pool_question.rs:171" |
| 6635 | ], |
| 6636 | "badge_stat": "pool_approved", |
| 6637 | "seeded_once": null |
| 6638 | }, |
| 6639 | "user.pool_published_total": { |
| 6640 | "counts": "pool_question", |
| 6641 | "where": "asker = <this user> AND status = 'approved' AND approved_by != asker", |
| 6642 | "writes": [ |
| 6643 | "db/pool_question.rs:174" |
| 6644 | ], |
| 6645 | "badge_stat": "pool_published", |
| 6646 | "seeded_once": null |
| 6647 | }, |
| 6648 | "user.lessons_attended_total": { |
| 6649 | "counts": "session_attendance", |
| 6650 | "where": "user = <this user> AND status IN ['present','late'] (students only)", |
| 6651 | "writes": [ |
| 6652 | "db/session_attendance.rs:142 (+-delta)", |
| 6653 | "db/session_attendance.rs:254 (-1)" |
| 6654 | ], |
| 6655 | "badge_stat": "lessons_attended", |
| 6656 | "seeded_once": null |
| 6657 | }, |
| 6658 | "user.high_mark_total": { |
| 6659 | "counts": "exam_result", |
| 6660 | "where": "user = <this user> AND mark >= HIGH_MARK_MIN (90), per graded sitting", |
| 6661 | "writes": [ |
| 6662 | "db/exam_result.rs:154", |
| 6663 | "db/exam_result.rs:313" |
| 6664 | ], |
| 6665 | "badge_stat": "high_mark", |
| 6666 | "seeded_once": null |
| 6667 | }, |
| 6668 | "user.study_streak_longest": { |
| 6669 | "counts": null, |
| 6670 | "where": "max value study_streak_current has ever reached", |
| 6671 | "writes": [ |
| 6672 | "db/pomodoro.rs:180" |
| 6673 | ], |
| 6674 | "badge_stat": "study_streak", |
| 6675 | "seeded_once": null |
| 6676 | }, |
| 6677 | "user.study_streak_current": { |
| 6678 | "counts": null, |
| 6679 | "where": "consecutive UTC days with >= 1 counted pomodoro stint", |
| 6680 | "writes": [ |
| 6681 | "db/pomodoro.rs:172" |
| 6682 | ], |
| 6683 | "badge_stat": null |
| 6684 | }, |
| 6685 | "user.study_streak_last_day": { |
| 6686 | "counts": null, |
| 6687 | "where": "Timestamp::day_number() of the last counted stint - DAYS FROM THE COMMON ERA EPOCH, not unix ms. 1970-01-01 = 719163.", |
| 6688 | "writes": [ |
| 6689 | "db/pomodoro.rs:178" |
| 6690 | ], |
| 6691 | "badge_stat": null |
| 6692 | }, |
| 6693 | "user.pomodoro_counted_day": { |
| 6694 | "counts": null, |
| 6695 | "where": "day_number() of the day the daily quota bucket belongs to", |
| 6696 | "writes": [ |
| 6697 | "db/pomodoro.rs:158" |
| 6698 | ], |
| 6699 | "badge_stat": null |
| 6700 | }, |
| 6701 | "user.pomodoro_counted_today": { |
| 6702 | "counts": "pomodoro_session", |
| 6703 | "where": "stints counted on pomodoro_counted_day; cap MAX_COUNTED_POMODORO_PER_DAY = 16", |
| 6704 | "writes": [ |
| 6705 | "db/pomodoro.rs:155 (reset)", |
| 6706 | "db/pomodoro.rs:169 (+1)" |
| 6707 | ], |
| 6708 | "badge_stat": null |
| 6709 | }, |
| 6710 | "meal_booking.attempt": { |
| 6711 | "counts": null, |
| 6712 | "where": "NOT a count - booking revision. Starts 1, +1 on every re-book after a cancel. Keys the ledger charge id.", |
| 6713 | "writes": [ |
| 6714 | "db/meal_booking.rs:133" |
| 6715 | ] |
| 6716 | }, |
| 6717 | "homework_submission.counted_on_time": { |
| 6718 | "counts": null, |
| 6719 | "where": "frozen bool: submitted_at <= homework.due_at, decided once at submit time", |
| 6720 | "writes": [ |
| 6721 | "db/homework_submission.rs:108" |
| 6722 | ], |
| 6723 | "seed": "migration_sql.rs:1443" |
| 6724 | }, |
| 6725 | "homework_submission.graded_by_result": { |
| 6726 | "counts": null, |
| 6727 | "where": "freeze pointer -> homework_result:<the SAME key>. NONE while the submission is still editable.", |
| 6728 | "writes": [ |
| 6729 | "db/homework_result.rs:114 (set)", |
| 6730 | "db/homework_result.rs:232 (clear)" |
| 6731 | ], |
| 6732 | "seed": "migration_sql.rs:1166" |
| 6733 | }, |
| 6734 | "course_session.held_counted_at": { |
| 6735 | "counts": null, |
| 6736 | "where": "stamp: non-NONE <=> this lesson has already credited its teacher's lessons_held_total exactly once", |
| 6737 | "writes": [ |
| 6738 | "db/session_attendance.rs:145" |
| 6739 | ] |
| 6740 | }, |
| 6741 | "bank_question.used_count": { |
| 6742 | "counts": null, |
| 6743 | "where": "DOES NOT EXIST AS A STORED COLUMN. It is a response-only field computed per request from a GROUP BY over exam_question.from_bank.", |
| 6744 | "writes": [ |
| 6745 | "web/bank_questions.rs:220 (read only)" |
| 6746 | ], |
| 6747 | "seed": null |
| 6748 | } |
| 6749 | }, |
| 6750 | "enums": { |
| 6751 | "hardcoded_in_rust": { |
| 6752 | "user.role": { |
| 6753 | "values": [ |
| 6754 | "parent", |
| 6755 | "student", |
| 6756 | "teacher", |
| 6757 | "manager", |
| 6758 | "admin" |
| 6759 | ], |
| 6760 | "source": "constant.rs:752 / domain/role.rs:29", |
| 6761 | "note": "Role::Ai ('ai') exists but is NOT assignable and is never stored on a user row (constant.rs:747-751). DEFAULT on the column is 'student'." |
| 6762 | }, |
| 6763 | "user.theme": { |
| 6764 | "values": [ |
| 6765 | "light", |
| 6766 | "dark" |
| 6767 | ], |
| 6768 | "source": "constant.rs:764 / domain/preferences.rs:18" |
| 6769 | }, |
| 6770 | "user.language": { |
| 6771 | "values": [ |
| 6772 | "tr", |
| 6773 | "en" |
| 6774 | ], |
| 6775 | "source": "constant.rs:766 / domain/preferences.rs:48" |
| 6776 | }, |
| 6777 | "user.palette_color": { |
| 6778 | "values": "regex ^#[0-9a-fA-F]{6}$ - stored lowercased, exactly 7 chars", |
| 6779 | "source": "constant.rs:770-781" |
| 6780 | }, |
| 6781 | "message.sender_folder": { |
| 6782 | "values": [ |
| 6783 | "sent", |
| 6784 | "archive", |
| 6785 | "trash" |
| 6786 | ], |
| 6787 | "source": "constant.rs:784", |
| 6788 | "note": "DEFAULT 'sent' (the sender's home folder)" |
| 6789 | }, |
| 6790 | "message.recipient_folder": { |
| 6791 | "values": [ |
| 6792 | "inbox", |
| 6793 | "archive", |
| 6794 | "trash" |
| 6795 | ], |
| 6796 | "source": "constant.rs:786", |
| 6797 | "note": "DEFAULT 'inbox'" |
| 6798 | }, |
| 6799 | "message.sender_origin / message.recipient_origin": { |
| 6800 | "values": [ |
| 6801 | "sent", |
| 6802 | "inbox", |
| 6803 | "archive", |
| 6804 | "trash", |
| 6805 | null |
| 6806 | ], |
| 6807 | "source": "migration_sql.rs:132-133", |
| 6808 | "note": "where the copy sat before it was filed; NONE while in its home folder. The full Folder enum also has 'deleted' (domain/message.rs:30-49)." |
| 6809 | }, |
| 6810 | "chatbot_message.role": { |
| 6811 | "values": [ |
| 6812 | "user", |
| 6813 | "assistant" |
| 6814 | ], |
| 6815 | "source": "domain/chatbot_message.rs:75-87" |
| 6816 | }, |
| 6817 | "chatbot_message.status": { |
| 6818 | "values": [ |
| 6819 | "pending", |
| 6820 | "complete", |
| 6821 | "failed" |
| 6822 | ], |
| 6823 | "source": "domain/chatbot_message.rs:94-106" |
| 6824 | }, |
| 6825 | "appointment.status": { |
| 6826 | "values": [ |
| 6827 | "pending", |
| 6828 | "approved", |
| 6829 | "rejected", |
| 6830 | "cancelled" |
| 6831 | ], |
| 6832 | "source": "domain/appointment.rs:95-110", |
| 6833 | "note": "DEFAULT 'pending'" |
| 6834 | }, |
| 6835 | "meal_booking.status": { |
| 6836 | "values": [ |
| 6837 | "booked", |
| 6838 | "cancelled" |
| 6839 | ], |
| 6840 | "source": "constant.rs:297 / domain/meal_booking.rs:98-110", |
| 6841 | "note": "DEFAULT 'booked'" |
| 6842 | }, |
| 6843 | "meal_attendance.status": { |
| 6844 | "values": [ |
| 6845 | "served", |
| 6846 | "missed" |
| 6847 | ], |
| 6848 | "source": "constant.rs:303", |
| 6849 | "note": "deliberately NOT the school's attendance_statuses" |
| 6850 | }, |
| 6851 | "meal_ledger.kind": { |
| 6852 | "values": [ |
| 6853 | "charge", |
| 6854 | "credit", |
| 6855 | "reversal" |
| 6856 | ], |
| 6857 | "source": "constant.rs:309" |
| 6858 | }, |
| 6859 | "payment_ledger.kind": { |
| 6860 | "values": [ |
| 6861 | "charge", |
| 6862 | "credit", |
| 6863 | "reversal", |
| 6864 | "refund" |
| 6865 | ], |
| 6866 | "source": "constant.rs:318" |
| 6867 | }, |
| 6868 | "course.kind": { |
| 6869 | "values": [ |
| 6870 | "course", |
| 6871 | "study", |
| 6872 | "club" |
| 6873 | ], |
| 6874 | "source": "constant.rs:278", |
| 6875 | "note": "DEFAULT 'course'" |
| 6876 | }, |
| 6877 | "exam.mode": { |
| 6878 | "values": [ |
| 6879 | "sync", |
| 6880 | "async", |
| 6881 | "open", |
| 6882 | null |
| 6883 | ], |
| 6884 | "source": "constant.rs:285", |
| 6885 | "note": "NONE = an offline-graded draft that cannot be sat" |
| 6886 | }, |
| 6887 | "exam_question.kind / bank_question.kind": { |
| 6888 | "values": [ |
| 6889 | "choice", |
| 6890 | "text" |
| 6891 | ], |
| 6892 | "source": "constant.rs:486" |
| 6893 | }, |
| 6894 | "homework_result.status": { |
| 6895 | "values": [ |
| 6896 | "done", |
| 6897 | "incomplete", |
| 6898 | "missing" |
| 6899 | ], |
| 6900 | "source": "constant.rs:292" |
| 6901 | }, |
| 6902 | "bank_question.visibility": { |
| 6903 | "values": [ |
| 6904 | "private", |
| 6905 | "school" |
| 6906 | ], |
| 6907 | "source": "constant.rs:798-799", |
| 6908 | "note": "DEFAULT 'private'" |
| 6909 | }, |
| 6910 | "pool_question.status": { |
| 6911 | "values": [ |
| 6912 | "pending", |
| 6913 | "approved" |
| 6914 | ], |
| 6915 | "source": "constant.rs:792-794", |
| 6916 | "note": "DEFAULT 'pending'. Rejection is not a state - the question is deleted." |
| 6917 | }, |
| 6918 | "board_stroke.kind": { |
| 6919 | "values": [ |
| 6920 | "stroke", |
| 6921 | "clear" |
| 6922 | ], |
| 6923 | "source": "constant.rs:398" |
| 6924 | }, |
| 6925 | "event.audience.kind": { |
| 6926 | "values": [ |
| 6927 | "school", |
| 6928 | "role", |
| 6929 | "course", |
| 6930 | "class", |
| 6931 | "registration" |
| 6932 | ], |
| 6933 | "source": "domain/event.rs:77-102", |
| 6934 | "shapes": [ |
| 6935 | "{kind:'school'}", |
| 6936 | "{kind:'role', role:'student'}", |
| 6937 | "{kind:'course', course: course:<id>}", |
| 6938 | "{kind:'class', class: class_group:<id>}", |
| 6939 | "{kind:'registration', capacity: 30}" |
| 6940 | ], |
| 6941 | "note": "internally tagged on 'kind'. capacity may be omitted = unlimited. audience.users was REMOVED (migration_sql.rs:286)." |
| 6942 | }, |
| 6943 | "question_image.content_type / bank_question_image.content_type": { |
| 6944 | "values": [ |
| 6945 | "image/png", |
| 6946 | "image/jpeg", |
| 6947 | "image/webp", |
| 6948 | "image/gif" |
| 6949 | ], |
| 6950 | "source": "constant.rs:96-97" |
| 6951 | }, |
| 6952 | "badge_award.badge": { |
| 6953 | "values": [ |
| 6954 | "homework_submitted_1", |
| 6955 | "homework_submitted_10", |
| 6956 | "homework_submitted_50", |
| 6957 | "homework_on_time_10", |
| 6958 | "homework_on_time_25", |
| 6959 | "exam_sat_1", |
| 6960 | "exam_sat_10", |
| 6961 | "exam_sat_25", |
| 6962 | "pomodoro_finished_10", |
| 6963 | "pomodoro_finished_50", |
| 6964 | "pomodoro_finished_200", |
| 6965 | "pomodoro_focus_ms_36000000", |
| 6966 | "pomodoro_focus_ms_180000000", |
| 6967 | "marks_given_10", |
| 6968 | "marks_given_50", |
| 6969 | "marks_given_250", |
| 6970 | "lessons_held_10", |
| 6971 | "lessons_held_50", |
| 6972 | "lessons_held_200", |
| 6973 | "pool_approved_5", |
| 6974 | "pool_approved_25", |
| 6975 | "pool_approved_100", |
| 6976 | "pool_published_1", |
| 6977 | "pool_published_10", |
| 6978 | "pool_published_50", |
| 6979 | "lessons_attended_10", |
| 6980 | "lessons_attended_50", |
| 6981 | "lessons_attended_200", |
| 6982 | "high_mark_1", |
| 6983 | "high_mark_10", |
| 6984 | "high_mark_25", |
| 6985 | "study_streak_3", |
| 6986 | "study_streak_7", |
| 6987 | "study_streak_30" |
| 6988 | ], |
| 6989 | "source": "constant.rs:1095-1142 (BADGES, 34 entries)", |
| 6990 | "note": "a badge_award row must be consistent with the user's counter: db/badge.rs only ever awards when counter >= threshold" |
| 6991 | }, |
| 6992 | "school.status (CONTROL DB)": { |
| 6993 | "values": [ |
| 6994 | "active", |
| 6995 | "suspended" |
| 6996 | ], |
| 6997 | "source": "tenant.rs:117-131" |
| 6998 | }, |
| 6999 | "school.modules[*] (CONTROL DB)": { |
| 7000 | "values": [ |
| 7001 | "chatbot", |
| 7002 | "notes", |
| 7003 | "messages", |
| 7004 | "events", |
| 7005 | "appointments", |
| 7006 | "courses", |
| 7007 | "course_notes", |
| 7008 | "classes", |
| 7009 | "sessions", |
| 7010 | "exams", |
| 7011 | "marks", |
| 7012 | "meals", |
| 7013 | "payments", |
| 7014 | "work", |
| 7015 | "pomodoro", |
| 7016 | "questions", |
| 7017 | "bank_questions", |
| 7018 | "attendance", |
| 7019 | "subjects", |
| 7020 | "homework", |
| 7021 | "boards" |
| 7022 | ], |
| 7023 | "source": "module.rs:26-52 + module.rs:67-115 (Module::ALL, 21)", |
| 7024 | "note": "stored SORTED (module.rs:284). Dependencies: subjects/course_notes/sessions/classes require courses; exams+homework require courses+subjects; marks requires exams; attendance requires events+sessions." |
| 7025 | }, |
| 7026 | "Package (API only, never stored)": { |
| 7027 | "values": [ |
| 7028 | "academics", |
| 7029 | "communication", |
| 7030 | "operations", |
| 7031 | "ai" |
| 7032 | ], |
| 7033 | "source": "module.rs:57-64 / module.rs:203-217" |
| 7034 | } |
| 7035 | }, |
| 7036 | "validated_against_settings_table": { |
| 7037 | "attendance.status / session_attendance.status": { |
| 7038 | "validated_against": "settings.attendance_statuses", |
| 7039 | "defaults": [ |
| 7040 | "present", |
| 7041 | "absent", |
| 7042 | "late", |
| 7043 | "excused" |
| 7044 | ], |
| 7045 | "source": "constant.rs:157 / domain/attendance.rs:40-52", |
| 7046 | "note": "these four are the MANDATORY CORE and can never be removed; a school may add more, max 20 entries, each <= 50 chars" |
| 7047 | }, |
| 7048 | "exam.kind": { |
| 7049 | "validated_against": "settings.exam_kinds[*].name", |
| 7050 | "defaults": [ |
| 7051 | "homework", |
| 7052 | "quiz", |
| 7053 | "midterm", |
| 7054 | "final", |
| 7055 | "project", |
| 7056 | "oral" |
| 7057 | ], |
| 7058 | "source": "constant.rs:165-172 / domain/exam.rs:87-104", |
| 7059 | "note": "each default weight = 1; weight range 1..=100. Every exam.kind used must also have a kind_ref row once a mark exists under it." |
| 7060 | }, |
| 7061 | "menu.slot": { |
| 7062 | "validated_against": "settings.meal_slots[*].name", |
| 7063 | "defaults": [ |
| 7064 | "breakfast", |
| 7065 | "lunch", |
| 7066 | "snack" |
| 7067 | ], |
| 7068 | "source": "constant.rs:207 / domain/menu.rs:138-164", |
| 7069 | "note": "snapshotted as TEXT on the menu row (not a link) and used verbatim in the record id, so / \\ ? # % are refused" |
| 7070 | }, |
| 7071 | "menu_dish.tags[*] / dietary_profile.tags[*]": { |
| 7072 | "validated_against": "settings.dietary_tags", |
| 7073 | "defaults": [ |
| 7074 | "vegetarian", |
| 7075 | "vegan", |
| 7076 | "gluten_free", |
| 7077 | "lactose_free", |
| 7078 | "nut_allergy" |
| 7079 | ], |
| 7080 | "source": "constant.rs:212-218 / domain/dietary_profile.rs:52-66", |
| 7081 | "note": "max 10 tags per dish / per profile" |
| 7082 | }, |
| 7083 | "settings.grade_bands[*].label": { |
| 7084 | "validated_against": "free text, school-defined", |
| 7085 | "defaults": [], |
| 7086 | "source": "domain/settings.rs:255", |
| 7087 | "note": "default is an EMPTY list. If non-empty: min in 0..=100, mins unique, one band must start at 0." |
| 7088 | }, |
| 7089 | "class_group.grade / class_blueprint.grade": { |
| 7090 | "validated_against": "NOT an enum and NOT a settings list - FREE TEXT", |
| 7091 | "constraint": "1..=MAX_CLASS_GRADE_LEN (20) chars", |
| 7092 | "source": "constant.rs:117-118", |
| 7093 | "note": "class_blueprint uses it as the record key, so it must be a legal record-id key" |
| 7094 | } |
| 7095 | } |
| 7096 | }, |
| 7097 | "time_and_value_formats": { |
| 7098 | "timestamps": { |
| 7099 | "representation": "i64 unix MILLISECONDS, UTC, stored as SurrealDB TYPE int - NEVER a datetime", |
| 7100 | "source": "domain/timestamp.rs:1-13, :30-41", |
| 7101 | "surrealql": "write a plain integer literal, e.g. created_at: 1767225600000", |
| 7102 | "forbidden": "time::now() and d'2026-01-01' produce a datetime value, which fails coercion into TYPE int", |
| 7103 | "sql_now_idiom": "time::unix(time::now()) * 1000 (migration_sql.rs:1360)" |
| 7104 | }, |
| 7105 | "day_numbers": { |
| 7106 | "fields": [ |
| 7107 | "user.study_streak_last_day", |
| 7108 | "user.pomodoro_counted_day" |
| 7109 | ], |
| 7110 | "representation": "chrono NaiveDate::num_days_from_ce() - days from the Common Era epoch", |
| 7111 | "anchor": "1970-01-01 = 719163 (pinned by the test at domain/timestamp.rs:145)", |
| 7112 | "formula": "day_number = floor(unix_ms / 86400000) + 719163", |
| 7113 | "source": "domain/timestamp.rs:78-97" |
| 7114 | }, |
| 7115 | "money": { |
| 7116 | "representation": "integer MINOR UNITS (kurus). Never decimal.", |
| 7117 | "fields": [ |
| 7118 | "menu_dish.price_minor", |
| 7119 | "meal_booking.price_minor", |
| 7120 | "meal_ledger.amount_minor", |
| 7121 | "payment_ledger.amount_minor", |
| 7122 | "fee_plan.installments[*].amount_minor" |
| 7123 | ], |
| 7124 | "limits": "MAX_DISH_PRICE_MINOR = 1000000, MAX_LEDGER_AMOUNT_MINOR = 10000000", |
| 7125 | "source": "migration_sql.rs:800 / constant.rs:239-240" |
| 7126 | }, |
| 7127 | "date_text": { |
| 7128 | "fields": [ |
| 7129 | "menu.date" |
| 7130 | ], |
| 7131 | "format": "YYYY-MM-DD, calendar day, no timezone", |
| 7132 | "source": "migration_sql.rs:770-782", |
| 7133 | "note": "it is part of the record id, so it must be exactly 10 chars" |
| 7134 | }, |
| 7135 | "user.birth_date": { |
| 7136 | "type": "option<string>", |
| 7137 | "format": "calendar date text", |
| 7138 | "source": "migration_sql.rs:57", |
| 7139 | "note": "validator allows a one-day grace around today_utc for clients up to UTC+14 (domain/timestamp.rs:66-70). (exact regex unverified - see src/validate.rs)" |
| 7140 | }, |
| 7141 | "grade": { |
| 7142 | "fields": [ |
| 7143 | "class_group.grade", |
| 7144 | "class_blueprint.grade" |
| 7145 | ], |
| 7146 | "format": "FREE TEXT, 1..=20 chars, no enum and no settings list", |
| 7147 | "source": "constant.rs:117-118", |
| 7148 | "note": "class_blueprint uses it as its record key. Typical Turkish school values would be like 9, 10, 11, 12 or 9-A - but nothing in the code prescribes any." |
| 7149 | }, |
| 7150 | "marks": { |
| 7151 | "fields": [ |
| 7152 | "exam_result.mark", |
| 7153 | "homework_result.mark" |
| 7154 | ], |
| 7155 | "range": "0..=100 (MAX_MARK)", |
| 7156 | "source": "constant.rs:502-503", |
| 7157 | "note": "HIGH_MARK_MIN = 90 (constant.rs:1081)" |
| 7158 | }, |
| 7159 | "points": { |
| 7160 | "fields": [ |
| 7161 | "exam_question.points", |
| 7162 | "bank_question.points" |
| 7163 | ], |
| 7164 | "range": "1..=100", |
| 7165 | "source": "constant.rs:491-492" |
| 7166 | } |
| 7167 | }, |
| 7168 | "auth": { |
| 7169 | "password_hash": { |
| 7170 | "algorithm": "Argon2id", |
| 7171 | "version": "0x13 (19)", |
| 7172 | "params": "Argon2::default() -> m_cost = 19456 KiB (19 MiB), t_cost = 2, p_cost = 1, 32-byte output", |
| 7173 | "salt": "16 random bytes, base64 without padding (22 chars)", |
| 7174 | "phc_format": "$argon2id$v=19$m=19456,t=2,p=1$<22-char-b64-salt>$<43-char-b64-hash>", |
| 7175 | "source": "domain/user.rs:95-104, Cargo.toml:26 (argon2 0.5.3)", |
| 7176 | "known_hash_literal": null, |
| 7177 | "note": "There is NO hardcoded argon2 hash anywhere in the repository. Every in-repo SQL user insert uses the literal placeholder 'x' (e.g. database.rs:568, tenant.rs:668, db/enrollment.rs:265), which can never verify. Seed data must compute a real hash." |
| 7178 | }, |
| 7179 | "test_password": { |
| 7180 | "value": "secret1", |
| 7181 | "source": "tests/common/mod.rs:216, :390", |
| 7182 | "note": "used only via POST /auth/register, never stored as a literal" |
| 7183 | }, |
| 7184 | "decoy_password": { |
| 7185 | "value": "decoy-password-not-a-secret", |
| 7186 | "source": "constant.rs:810", |
| 7187 | "note": "timing-attack decoy, hashed at runtime, never stored" |
| 7188 | }, |
| 7189 | "session.token": { |
| 7190 | "format": "64 lowercase hex chars (32 random bytes)", |
| 7191 | "source": "domain/session.rs:30-39" |
| 7192 | }, |
| 7193 | "session.expires_at": { |
| 7194 | "formula": "Timestamp::now() + 7 * 86400000", |
| 7195 | "source": "db/session.rs:10-19, constant.rs:511 SESSION_DURATION_DAYS = 7" |
| 7196 | }, |
| 7197 | "cookie": { |
| 7198 | "format": "session=<school_slug>.<token>", |
| 7199 | "source": "tests/common/mod.rs:66-72" |
| 7200 | }, |
| 7201 | "username": { |
| 7202 | "constraints": "3..=32 chars; separators . _ -", |
| 7203 | "reserved": [ |
| 7204 | "admin", |
| 7205 | "administrator", |
| 7206 | "root", |
| 7207 | "support", |
| 7208 | "system", |
| 7209 | "moderator", |
| 7210 | "staff" |
| 7211 | ], |
| 7212 | "source": "constant.rs:17-35", |
| 7213 | "note": "reserved names are refused at /auth/register only, not on a direct DB write or the builder's admin seed" |
| 7214 | }, |
| 7215 | "password_plain": { |
| 7216 | "constraints": "6..=128 chars", |
| 7217 | "source": "constant.rs:37-38" |
| 7218 | }, |
| 7219 | "school_slug": { |
| 7220 | "constraints": "^[a-z0-9][a-z0-9-]{1,31}$, 2..=32 chars", |
| 7221 | "reserved": [ |
| 7222 | "builder", |
| 7223 | "control" |
| 7224 | ], |
| 7225 | "source": "tenant.rs:49-96, constant.rs:11-12", |
| 7226 | "note": "the slug is simultaneously the cookie prefix, the SurrealDB DATABASE name, and the blob directory. school:<slug> is the control-db record id." |
| 7227 | } |
| 7228 | }, |
| 7229 | "load_order": [ |
| 7230 | "kind_ref", |
| 7231 | "migration_mark", |
| 7232 | "rate_limit", |
| 7233 | "settings", |
| 7234 | "slot_ref", |
| 7235 | "term", |
| 7236 | "user", |
| 7237 | "appointment_slot", |
| 7238 | "badge_award", |
| 7239 | "board", |
| 7240 | "chatbot_thread", |
| 7241 | "class_group", |
| 7242 | "course", |
| 7243 | "dietary_profile", |
| 7244 | "fee_plan", |
| 7245 | "meal_ledger", |
| 7246 | "menu", |
| 7247 | "message", |
| 7248 | "note", |
| 7249 | "parent_link", |
| 7250 | "payment_ledger", |
| 7251 | "pomodoro_session", |
| 7252 | "pool_question", |
| 7253 | "session", |
| 7254 | "work_entry", |
| 7255 | "appointment", |
| 7256 | "board_stroke", |
| 7257 | "chatbot_message", |
| 7258 | "class_blueprint", |
| 7259 | "class_member", |
| 7260 | "course_note", |
| 7261 | "course_session", |
| 7262 | "enrollment", |
| 7263 | "event", |
| 7264 | "exam", |
| 7265 | "fee_plan_assignment", |
| 7266 | "meal_attendance", |
| 7267 | "meal_booking", |
| 7268 | "menu_dish", |
| 7269 | "note_file", |
| 7270 | "solution", |
| 7271 | "subject", |
| 7272 | "attendance", |
| 7273 | "bank_question", |
| 7274 | "class_course", |
| 7275 | "course_note_file", |
| 7276 | "exam_attempt", |
| 7277 | "exam_result", |
| 7278 | "homework", |
| 7279 | "registration", |
| 7280 | "session_attendance", |
| 7281 | "bank_question_image", |
| 7282 | "exam_question", |
| 7283 | "homework_result", |
| 7284 | "rag_output", |
| 7285 | "answer_image", |
| 7286 | "exam_answer", |
| 7287 | "homework_submission", |
| 7288 | "question_image", |
| 7289 | "homework_file" |
| 7290 | ], |
| 7291 | "dependencies": { |
| 7292 | "user": [], |
| 7293 | "session": [ |
| 7294 | "user" |
| 7295 | ], |
| 7296 | "note": [ |
| 7297 | "user" |
| 7298 | ], |
| 7299 | "message": [ |
| 7300 | "user" |
| 7301 | ], |
| 7302 | "board": [ |
| 7303 | "user" |
| 7304 | ], |
| 7305 | "board_stroke": [ |
| 7306 | "board", |
| 7307 | "user" |
| 7308 | ], |
| 7309 | "note_file": [ |
| 7310 | "note" |
| 7311 | ], |
| 7312 | "course_note": [ |
| 7313 | "course", |
| 7314 | "user" |
| 7315 | ], |
| 7316 | "course_note_file": [ |
| 7317 | "course_note" |
| 7318 | ], |
| 7319 | "rag_output": [ |
| 7320 | "course", |
| 7321 | "course_note", |
| 7322 | "course_note_file" |
| 7323 | ], |
| 7324 | "chatbot_thread": [ |
| 7325 | "user" |
| 7326 | ], |
| 7327 | "chatbot_message": [ |
| 7328 | "chatbot_thread", |
| 7329 | "user" |
| 7330 | ], |
| 7331 | "rate_limit": [], |
| 7332 | "event": [ |
| 7333 | "class_group", |
| 7334 | "course", |
| 7335 | "user" |
| 7336 | ], |
| 7337 | "attendance": [ |
| 7338 | "event", |
| 7339 | "user" |
| 7340 | ], |
| 7341 | "registration": [ |
| 7342 | "event", |
| 7343 | "user" |
| 7344 | ], |
| 7345 | "term": [], |
| 7346 | "course": [ |
| 7347 | "term", |
| 7348 | "user" |
| 7349 | ], |
| 7350 | "subject": [ |
| 7351 | "course" |
| 7352 | ], |
| 7353 | "class_group": [ |
| 7354 | "term", |
| 7355 | "user" |
| 7356 | ], |
| 7357 | "class_blueprint": [ |
| 7358 | "course", |
| 7359 | "user" |
| 7360 | ], |
| 7361 | "class_member": [ |
| 7362 | "class_group", |
| 7363 | "user" |
| 7364 | ], |
| 7365 | "class_course": [ |
| 7366 | "class_blueprint", |
| 7367 | "class_group", |
| 7368 | "course", |
| 7369 | "user" |
| 7370 | ], |
| 7371 | "enrollment": [ |
| 7372 | "class_group", |
| 7373 | "course", |
| 7374 | "user" |
| 7375 | ], |
| 7376 | "parent_link": [ |
| 7377 | "user" |
| 7378 | ], |
| 7379 | "course_session": [ |
| 7380 | "course", |
| 7381 | "user" |
| 7382 | ], |
| 7383 | "session_attendance": [ |
| 7384 | "course", |
| 7385 | "course_session", |
| 7386 | "user" |
| 7387 | ], |
| 7388 | "work_entry": [ |
| 7389 | "user" |
| 7390 | ], |
| 7391 | "pomodoro_session": [ |
| 7392 | "user" |
| 7393 | ], |
| 7394 | "exam": [ |
| 7395 | "course", |
| 7396 | "user" |
| 7397 | ], |
| 7398 | "exam_attempt": [ |
| 7399 | "exam", |
| 7400 | "user" |
| 7401 | ], |
| 7402 | "exam_question": [ |
| 7403 | "bank_question", |
| 7404 | "exam", |
| 7405 | "subject" |
| 7406 | ], |
| 7407 | "question_image": [ |
| 7408 | "exam", |
| 7409 | "exam_question" |
| 7410 | ], |
| 7411 | "bank_question": [ |
| 7412 | "exam", |
| 7413 | "subject", |
| 7414 | "user" |
| 7415 | ], |
| 7416 | "bank_question_image": [ |
| 7417 | "bank_question" |
| 7418 | ], |
| 7419 | "exam_answer": [ |
| 7420 | "exam", |
| 7421 | "exam_question", |
| 7422 | "user" |
| 7423 | ], |
| 7424 | "answer_image": [ |
| 7425 | "exam", |
| 7426 | "exam_question", |
| 7427 | "user" |
| 7428 | ], |
| 7429 | "exam_result": [ |
| 7430 | "exam", |
| 7431 | "user" |
| 7432 | ], |
| 7433 | "pool_question": [ |
| 7434 | "user" |
| 7435 | ], |
| 7436 | "solution": [ |
| 7437 | "pool_question", |
| 7438 | "user" |
| 7439 | ], |
| 7440 | "settings": [], |
| 7441 | "homework": [ |
| 7442 | "course", |
| 7443 | "subject", |
| 7444 | "user" |
| 7445 | ], |
| 7446 | "homework_submission": [ |
| 7447 | "homework", |
| 7448 | "homework_result", |
| 7449 | "user" |
| 7450 | ], |
| 7451 | "homework_file": [ |
| 7452 | "homework_submission" |
| 7453 | ], |
| 7454 | "homework_result": [ |
| 7455 | "homework", |
| 7456 | "user" |
| 7457 | ], |
| 7458 | "appointment_slot": [ |
| 7459 | "user" |
| 7460 | ], |
| 7461 | "appointment": [ |
| 7462 | "appointment_slot", |
| 7463 | "user" |
| 7464 | ], |
| 7465 | "menu": [ |
| 7466 | "user" |
| 7467 | ], |
| 7468 | "menu_dish": [ |
| 7469 | "menu" |
| 7470 | ], |
| 7471 | "dietary_profile": [ |
| 7472 | "user" |
| 7473 | ], |
| 7474 | "meal_booking": [ |
| 7475 | "menu", |
| 7476 | "user" |
| 7477 | ], |
| 7478 | "meal_attendance": [ |
| 7479 | "menu", |
| 7480 | "user" |
| 7481 | ], |
| 7482 | "meal_ledger": [ |
| 7483 | "user" |
| 7484 | ], |
| 7485 | "fee_plan": [ |
| 7486 | "user" |
| 7487 | ], |
| 7488 | "fee_plan_assignment": [ |
| 7489 | "fee_plan", |
| 7490 | "user" |
| 7491 | ], |
| 7492 | "payment_ledger": [ |
| 7493 | "user" |
| 7494 | ], |
| 7495 | "badge_award": [ |
| 7496 | "user" |
| 7497 | ], |
| 7498 | "kind_ref": [], |
| 7499 | "slot_ref": [], |
| 7500 | "migration_mark": [] |
| 7501 | }, |
| 7502 | "pitfalls": [ |
| 7503 | { |
| 7504 | "id": "default-empty-array", |
| 7505 | "severity": "high", |
| 7506 | "where": "migration_sql.rs:645-657 (settings), also migration_sql.rs:369-372 (class_blueprint.courses)", |
| 7507 | "what": "A required array field with DEFAULT [] on a SCHEMAFULL row. DEFAULT fires on CREATE only. Any later whole-row write (UPDATE ... CONTENT) that omits the key coerces it to NONE and the write FAILS, permanently. That is why settings.meal_slots / dietary_tags are option<> with NO DEFAULT, and why class_blueprint.courses carries no DEFAULT.", |
| 7508 | "seed_rule": "Always write every array field EXPLICITLY. Never rely on DEFAULT []. The three that still carry DEFAULT [] are course.teachers, menu_dish.tags, dietary_profile.tags - write them anyway." |
| 7509 | }, |
| 7510 | { |
| 7511 | "id": "readonly-tables", |
| 7512 | "severity": "high", |
| 7513 | "where": "meal_ledger (migration_sql.rs:846-856), payment_ledger (migration_sql.rs:894-903), plus READONLY columns on chatbot_thread/chatbot_message/homework*/menu*/meal_*/fee_plan*", |
| 7514 | "what": "READONLY is per-FIELD, not per-table. A CREATE / INSERT that sets the field for the FIRST time is allowed; any later UPDATE of it is rejected.", |
| 7515 | "seed_rule": "meal_ledger and payment_ledger rows CAN be inserted - just get every value right the first time and never UPDATE them afterwards. Same for menu.date/slot, homework.course/created_by/created_at, meal_booking.menu/student/booked_by/created_at, fee_plan_assignment.*, bank_question.created_at, homework_file.file/created_at." |
| 7516 | }, |
| 7517 | { |
| 7518 | "id": "schemafull-strips", |
| 7519 | "severity": "high", |
| 7520 | "where": "every table (all 60 are SCHEMAFULL)", |
| 7521 | "what": "An undefined key is SILENTLY STRIPPED on write (it is not an error) - except that SurrealDB rejects a write to a row that still holds a column whose definition was removed. rag_output.payload is the only FLEXIBLE object (migration_sql.rs:211).", |
| 7522 | "seed_rule": "A typo in a field name loses the value with no error. Verify every field name against schema.json character by character." |
| 7523 | }, |
| 7524 | { |
| 7525 | "id": "ddl-plus-dml-same-batch", |
| 7526 | "severity": "medium", |
| 7527 | "where": "migration_sql.rs:41-47 (doc comment)", |
| 7528 | "what": "Statements inside ONE query batch see the schema as it stood when the batch STARTED. A DEFINE FIELD next to an UPDATE writing that field silently strips the value. This is why MIGRATION_BATCHES is three separate queries.", |
| 7529 | "seed_rule": "Run the seed as a query SEPARATE from any schema work, i.e. after migrate() has fully finished." |
| 7530 | }, |
| 7531 | { |
| 7532 | "id": "value-and-assert", |
| 7533 | "severity": "info", |
| 7534 | "where": "whole DDL", |
| 7535 | "what": "There is NOT A SINGLE DEFINE FIELD ... VALUE or ... ASSERT in the schema (verified by grep). Every enum is enforced only by Rust newtypes.", |
| 7536 | "seed_rule": "The database will happily accept an invalid enum string. Nothing writes over your value either. But the API will 500 on deserialization when a Rust newtype cannot parse it back - so the enum lists in this document are HARD requirements even though the DB does not enforce them." |
| 7537 | }, |
| 7538 | { |
| 7539 | "id": "no-fk-enforcement", |
| 7540 | "severity": "high", |
| 7541 | "where": "whole DDL", |
| 7542 | "what": "record<x> is a TYPE check only - SurrealDB verifies the value is a record pointer into table x, NOT that the target row exists. There is no REFERENCE / ON DELETE clause anywhere. A dangling link is accepted silently and then breaks reads at the application layer (e.g. the on-time backfill's traversal yields no value).", |
| 7543 | "seed_rule": "Insert strictly in the topological load_order. (partially unverified: exact SurrealDB 3.2 coercion behaviour for a non-existent target was not executed - but no REFERENCE clause exists, so nothing can enforce it.)" |
| 7544 | }, |
| 7545 | { |
| 7546 | "id": "unique-indexes", |
| 7547 | "severity": "high", |
| 7548 | "where": "see indexes in each table", |
| 7549 | "what": "UNIQUE indexes that a naive generator will collide on: user_username; session_token; menu_date_slot (date+slot); dietary_profile_student; attendance_event_user; registration_event_user; class_member_class_user; class_course_class_course; enrollment_course_user; parent_link_parent_student; session_attendance_session_user; meal_attendance_menu_student; exam_attempt_exam_user_seq; exam_answer_question_user_seq; exam_result_exam_user_seq; school_slug + builder_username + builder_session_token (control db).", |
| 7550 | "seed_rule": "Most of these are ALREADY implied by the composite record id, so a duplicate id and a duplicate index entry are the same bug. user_username and session_token are the two that are NOT implied by the id - guard those separately." |
| 7551 | }, |
| 7552 | { |
| 7553 | "id": "counters-must-match", |
| 7554 | "severity": "critical", |
| 7555 | "where": "see counters section", |
| 7556 | "what": "Every counter is the AUTHORITY, not a cache (db/cap.rs:1-31). A course whose enrollment_count is wrong denies real students a place and can never be deleted ((enrollment_count ?? 0) = 0 guard).", |
| 7557 | "seed_rule": "Write every counter consistently, or omit it (absent reads as zero) only where the backfill will recompute it. Only course.enrollment_count and board.total_stroke_count are recomputed on every boot. term.class_count, class_group.*_count, course_note.file_count, user.board_count, user.marks_given_total and the other staff/student badge tallies have NO backfill and will stay wrong forever." |
| 7558 | }, |
| 7559 | { |
| 7560 | "id": "profile-counters-mark", |
| 7561 | "severity": "high", |
| 7562 | "where": "migration_sql.rs:1432-1461", |
| 7563 | "what": "The five student badge counters are seeded ONCE per volume under migration_mark:profile_counters, and the first line of that block is UPDATE user SET homework_submitted_total = 0, homework_on_time_total = 0, exam_sat_total = 0, pomodoro_finished_total = 0, pomodoro_focus_ms_total = 0 - a full reset.", |
| 7564 | "seed_rule": "If you seed BEFORE the first boot, migrate() will recompute those five from your rows (good). If you seed AFTER the mark is written, your values stand as written and nothing checks them. Prefer: create the school (which runs migrate), then seed, and set all counters yourself." |
| 7565 | }, |
| 7566 | { |
| 7567 | "id": "id-escaping", |
| 7568 | "severity": "critical", |
| 7569 | "where": "hand-written .surql only", |
| 7570 | "what": "Every minted key is a ULID or starts with one, so it BEGINS WITH A DIGIT. The codebase never spells an id into SQL text - it binds a RecordId - so the escaping question is new to a seed file. The only literal ids in the repo are safe ones (migration_mark:board_roster, settings:school).", |
| 7571 | "seed_rule": "Write user:\\u27e801J...\\u27e9 (angle brackets), user:`01J...` (backticks), or type::record('user','01J...'). Never bare user:01J...." |
| 7572 | }, |
| 7573 | { |
| 7574 | "id": "parenthesise-nullish", |
| 7575 | "severity": "medium", |
| 7576 | "where": "db/cap.rs:554, db/cap.rs:766, db/board_stroke.rs:155", |
| 7577 | "what": "In SurrealQL, n ?? 0 < $cap parses as n ?? (0 < $cap), which is truthy for every row. Always (n ?? 0) < $cap.", |
| 7578 | "seed_rule": "Relevant only if the seed script writes its own guarded UPDATEs." |
| 7579 | }, |
| 7580 | { |
| 7581 | "id": "day-number-not-millis", |
| 7582 | "severity": "medium", |
| 7583 | "where": "user.study_streak_last_day, user.pomodoro_counted_day", |
| 7584 | "what": "These two int columns are NOT unix ms. They are chrono num_days_from_ce() - days from the Common Era epoch, where 1970-01-01 = 719163 (domain/timestamp.rs:88-97, test at :145).", |
| 7585 | "seed_rule": "day_number = floor(unix_ms / 86400000) + 719163" |
| 7586 | }, |
| 7587 | { |
| 7588 | "id": "open-row-ids", |
| 7589 | "severity": "medium", |
| 7590 | "where": "work_entry, pomodoro_session", |
| 7591 | "what": "An IN-PROGRESS work entry or pomodoro stint lives at the FIXED id open_<user ULID>; closing it writes a fresh ULID-keyed row. A second open row for one user is impossible by construction.", |
| 7592 | "seed_rule": "Never give a user two rows whose id is open_<their ulid>, and never use a ULID id for a row with finished_at = NONE / check_out = NONE." |
| 7593 | }, |
| 7594 | { |
| 7595 | "id": "seq-1-bare", |
| 7596 | "severity": "high", |
| 7597 | "where": "domain/key.rs:16-22", |
| 7598 | "what": "For exam_attempt / exam_answer / exam_result / answer_image, the FIRST sitting's id is the bare {scope}_{user} with NO _1 suffix, while the seq COLUMN is still 1.", |
| 7599 | "seed_rule": "Never write ..._1 as an id. seq=1 -> bare key; seq=2 -> key_2." |
| 7600 | }, |
| 7601 | { |
| 7602 | "id": "no-password-hash-literal", |
| 7603 | "severity": "high", |
| 7604 | "where": "whole repo", |
| 7605 | "what": "There is no hardcoded argon2 hash anywhere. Every in-repo SQL user insert uses the placeholder 'x', which can never verify.", |
| 7606 | "seed_rule": "Generate a real $argon2id$v=19$m=19456,t=2,p=1$... hash for every account that must be able to log in. One shared hash for 250 students is fine and fast." |
| 7607 | }, |
| 7608 | { |
| 7609 | "id": "settings-lazy", |
| 7610 | "severity": "medium", |
| 7611 | "where": "db/settings.rs:9-12, tenant.rs:390-447", |
| 7612 | "what": "School creation does NOT write a settings row. An absent settings:school row reads as the built-in defaults everywhere.", |
| 7613 | "seed_rule": "Seed settings:school ONLY if you need a non-default vocabulary. If you do, write EVERY required field (exam_kinds, exam_kinds.*.name, exam_kinds.*.weight, attendance_statuses, grade_bands) - they are non-option and a missing one fails the write." |
| 7614 | }, |
| 7615 | { |
| 7616 | "id": "kind-ref-slot-ref", |
| 7617 | "severity": "high", |
| 7618 | "where": "migration_sql.rs:1265-1271", |
| 7619 | "what": "kind_ref:<exam kind> and slot_ref:<meal slot> rows are created lazily by the first exam_result / menu. They ARE seeded by the backfill on boot - but only once, guarded by count = NONE.", |
| 7620 | "seed_rule": "Either seed them yourself (count = the matching row count) or let the boot backfill do it. Do not do both with different numbers." |
| 7621 | }, |
| 7622 | { |
| 7623 | "id": "audience-users-removed", |
| 7624 | "severity": "low", |
| 7625 | "where": "migration_sql.rs:286", |
| 7626 | "what": "event.audience.users was REMOVED. Writing it will be silently stripped (SCHEMAFULL) and the row will read as a broken audience.", |
| 7627 | "seed_rule": "Use {kind:'registration'} + registration rows instead." |
| 7628 | }, |
| 7629 | { |
| 7630 | "id": "exam-question-subject-required", |
| 7631 | "severity": "medium", |
| 7632 | "where": "migration_sql.rs:511, migration_sql.rs:987", |
| 7633 | "what": "exam_question.subject is a REQUIRED record<subject>. The boot backfill DELETES every exam_question with subject = NONE (and its answers first).", |
| 7634 | "seed_rule": "Every exam_question must name a real subject, and that subject's course should be the exam's course." |
| 7635 | }, |
| 7636 | { |
| 7637 | "id": "rate-limit-and-http-seeding", |
| 7638 | "severity": "low", |
| 7639 | "where": "constant.rs:681-683", |
| 7640 | "what": "DEFAULT_AUTH_RATE_LIMIT = 10/min/IP and DEFAULT_API_RATE_LIMIT = 300/min/IP. A 250-student seed driven over HTTP will 429.", |
| 7641 | "seed_rule": "Prefer direct SurrealQL over the API for bulk seeding, or raise the env knobs." |
| 7642 | } |
| 7643 | ] |
| 7644 | } |