forked from agzam/vyatsu-schedule
fix(teacher): register migration, containment period queries, concurrency guards
- Register AppDatabase.MIGRATION_3_4 so v3 databases upgrade without data loss - Query teacher schedule periods by containment (weekStart<=x AND weekEnd>=x) instead of exact weekStart, matching 2-week catalog windows - Clip buildTeacherSchedule days to the requested week range - Add weeksFor() to enumerate weeks of a catalog window for the UI selector - Serialize syncPeriod body with a Mutex to protect the unique index - Rethrow CancellationException before generic catch; version loadRevision checks so stale observers/loads are cancelled - Sync job tracking in PickerViewModel; keep loading true while empty - Drop dead selectTeacher helper
This commit is contained in:
@@ -23,6 +23,7 @@ class AppContainer(context: Context) {
|
||||
AppDatabase::class.java,
|
||||
"vyatsu_schedule.db"
|
||||
)
|
||||
.addMigrations(AppDatabase.MIGRATION_3_4)
|
||||
.fallbackToDestructiveMigration(dropAllTables = true)
|
||||
.build()
|
||||
|
||||
|
||||
Reference in New Issue
Block a user