Drop backfills that crashed boot
Browse files at this commit992619b23e9bc1b60805b9c36b4d84a22538fdb7Parent: 3681441- fix
- drop backfills that crashed boot
1 changed file +0 -4
- src/database.rs +0 -4
src/database.rsmodified+0 -4
| @@ -128,8 +128,6 @@ const MIGRATION: &str = " | |||
| 128 | DEFINE FIELD IF NOT EXISTS max_attempts ON exam TYPE int DEFAULT 1; | 128 | DEFINE FIELD IF NOT EXISTS max_attempts ON exam TYPE int DEFAULT 1; |
| 129 | DEFINE FIELD IF NOT EXISTS allow_rejoin ON exam TYPE bool DEFAULT true; | 129 | DEFINE FIELD IF NOT EXISTS allow_rejoin ON exam TYPE bool DEFAULT true; |
| 130 | DEFINE INDEX IF NOT EXISTS exam_course ON exam FIELDS course; | 130 | DEFINE INDEX IF NOT EXISTS exam_course ON exam FIELDS course; |
| 131 | - UPDATE exam SET max_attempts = 1 WHERE max_attempts = NONE; | ||
| 132 | - UPDATE exam SET allow_rejoin = true WHERE allow_rejoin = NONE; | ||
| 133 | 131 | ||
| 134 | DEFINE TABLE IF NOT EXISTS exam_attempt SCHEMAFULL; | 132 | DEFINE TABLE IF NOT EXISTS exam_attempt SCHEMAFULL; |
| 135 | DEFINE FIELD IF NOT EXISTS exam ON exam_attempt TYPE record<exam>; | 133 | DEFINE FIELD IF NOT EXISTS exam ON exam_attempt TYPE record<exam>; |
| @@ -138,8 +136,6 @@ const MIGRATION: &str = " | |||
| 138 | DEFINE FIELD IF NOT EXISTS started_at ON exam_attempt TYPE int; | 136 | DEFINE FIELD IF NOT EXISTS started_at ON exam_attempt TYPE int; |
| 139 | DEFINE FIELD IF NOT EXISTS finished_at ON exam_attempt TYPE option<int>; | 137 | DEFINE FIELD IF NOT EXISTS finished_at ON exam_attempt TYPE option<int>; |
| 140 | DEFINE FIELD IF NOT EXISTS left_at ON exam_attempt TYPE option<int>; | 138 | DEFINE FIELD IF NOT EXISTS left_at ON exam_attempt TYPE option<int>; |
| 141 | - UPDATE exam_attempt SET seq = 1 WHERE seq = NONE; | ||
| 142 | - REMOVE INDEX IF EXISTS exam_attempt_exam_user ON TABLE exam_attempt; | ||
| 143 | DEFINE INDEX IF NOT EXISTS exam_attempt_exam_user_seq ON exam_attempt FIELDS exam, user, seq UNIQUE; | 139 | DEFINE INDEX IF NOT EXISTS exam_attempt_exam_user_seq ON exam_attempt FIELDS exam, user, seq UNIQUE; |
| 144 | DEFINE INDEX IF NOT EXISTS exam_attempt_exam ON exam_attempt FIELDS exam; | 140 | DEFINE INDEX IF NOT EXISTS exam_attempt_exam ON exam_attempt FIELDS exam; |
| 145 | 141 | ||