Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions assets/translations/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"create_database": "Bibliothek erstellen",
"create_another_database": "Weitere Bibliothek erstellen",
"create_another_database_hint": "Wähle einen Ordner für ein neues verschlüsseltes Classi-Bibliothekspaket.",
"create_items_for_group_students": "Für jede Schüler:in einen Eintrag anlegen",
"continue_to_app": "Weiter zu Classi",
"copy_recovery_key": "Recovery-Key kopieren",
"current_passphrase": "Aktuelle Passphrase",
Expand Down Expand Up @@ -101,7 +102,7 @@
"empty_groups": "Noch keine Gruppen. Lege deine erste Gruppe an.",
"empty_homework": "Noch keine Hausaufgabeneinträge.",
"empty_list_items": "Noch keine Listeneinträge.",
"empty_lists": "Für diese Gruppe gibt es noch keine Listen.",
"empty_lists": "Es gibt noch keine Listen.",
"empty_student_lists": "Noch in keiner Liste eingetragen.",
"empty_material": "Noch keine Materialeinträge.",
"empty_notes": "Noch keine Notizen.",
Expand Down Expand Up @@ -198,11 +199,13 @@
"ok": "OK",
"save": "Speichern",
"search_students": "Schüler:innen suchen",
"select_all_students": "Alle auswählen",
"sessions": "Einträge",
"session_label": "Bezeichnung",
"session_notes": "Stundennotizen",
"settings": "Einstellungen",
"selected_students": "{count} ausgewählt",
"clear_selection": "Auswahl aufheben",
"sort_by_first_name": "Vorname",
"sort_by_last_name": "Nachname",
"sort_students": "Schüler:innen sortieren",
Expand Down Expand Up @@ -243,5 +246,7 @@
"biometric_unlock": "Biometrisch entsperren",
"biometric_unlock_hint": "Fingerabdruck oder Gesichtserkennung statt Passphrase verwenden.",
"biometric_reason": "Bestätige deine Identität, um Classi zu entsperren.",
"unlock_with_biometrics": "Biometrie verwenden"
"unlock_with_biometrics": "Biometrie verwenden",
"list_scope": "Listenbereich",
"global_list": "Globale Liste"
}
9 changes: 7 additions & 2 deletions assets/translations/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@
"create_database": "Create library",
"create_another_database": "Create another library",
"create_another_database_hint": "Pick a folder for a new encrypted Classi library package.",
"create_items_for_group_students": "Create one item per student",
"continue_to_app": "Continue to Classi",
"copy_recovery_key": "Copy recovery key",
"current_passphrase": "Current passphrase",
Expand Down Expand Up @@ -101,7 +102,7 @@
"empty_groups": "No groups yet. Add your first group to get started.",
"empty_homework": "No homework logs yet.",
"empty_list_items": "No checklist items yet.",
"empty_lists": "No lists for this group yet.",
"empty_lists": "No lists yet.",
"empty_student_lists": "Not on any lists yet.",
"empty_material": "No material logs yet.",
"empty_notes": "No notes yet.",
Expand Down Expand Up @@ -198,11 +199,13 @@
"ok": "OK",
"save": "Save",
"search_students": "Search students",
"select_all_students": "Select all",
"sessions": "sessions",
"session_label": "Session label",
"session_notes": "Lesson notes",
"settings": "Settings",
"selected_students": "{count} selected",
"clear_selection": "Clear selection",
"sort_by_first_name": "First name",
"sort_by_last_name": "Last name",
"sort_students": "Student sorting",
Expand Down Expand Up @@ -243,5 +246,7 @@
"biometric_unlock": "Unlock with biometrics",
"biometric_unlock_hint": "Use fingerprint or face recognition instead of your passphrase.",
"biometric_reason": "Confirm your identity to unlock Classi.",
"unlock_with_biometrics": "Use biometrics"
"unlock_with_biometrics": "Use biometrics",
"list_scope": "List scope",
"global_list": "Global list"
}
16 changes: 14 additions & 2 deletions lib/core/database/app_database.dart
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,10 @@ typedef AttendanceLog = AttendanceLogsTableData;
class AppDatabase extends _$AppDatabase {
AppDatabase._(super.executor, {required this.databasePath});

factory AppDatabase.open({required File dbFile, required String databaseKey}) {
factory AppDatabase.open({
required File dbFile,
required String databaseKey,
}) {
return AppDatabase._(
openEncryptedDatabase(dbFile, databaseKey),
databasePath: dbFile.path,
Expand All @@ -51,7 +54,7 @@ class AppDatabase extends _$AppDatabase {
final String databasePath;

@override
int get schemaVersion => 10;
int get schemaVersion => 11;

@override
MigrationStrategy get migration => MigrationStrategy(
Expand Down Expand Up @@ -93,6 +96,15 @@ class AppDatabase extends _$AppDatabase {
if (from < 10) {
await migrator.addColumn(studentsTable, studentsTable.seatIndex);
}
if (from < 11) {
await migrator.alterTable(TableMigration(listsTable));
await migrator.addColumn(listItemsTable, listItemsTable.studentIdsJson);
await customStatement('''
UPDATE list_items_table
SET student_ids_json = json_array(student_id)
WHERE student_id IS NOT NULL AND student_ids_json IS NULL
''');
}
},
);

Expand Down
Loading