6177214e-ce7c-49e3-99de-ff9721b26f63 — Commit 7f9248e7
Changed files
comwell_key_app/lib/database/comwell_db.dart | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-)
Diff
diff --git a/comwell_key_app/lib/database/comwell_db.dart b/comwell_key_app/lib/database/comwell_db.dart
index 63602429..06cb8b47 100644
--- a/comwell_key_app/lib/database/comwell_db.dart
+++ b/comwell_key_app/lib/database/comwell_db.dart
@@ -45,12 +45,11 @@ class ComwellDatabase extends _$ComwellDatabase {
MigrationStrategy get migration => destructiveFallback;
Future<void> deleteDatabase() async {
- await bookingsDao.delete(bookingEntity).go();
- await userDAO.delete(userEntity).go();
- await notificationPermissionDAO.delete(notificationPermissionEntity).go();
+ for (final table in allTables) {
+ await table.delete().go();
+ }
}
-
static Future<String> getCipher() async {
final cipher = await secureStorage.read(_cipherKey);
if (cipher == null || cipher.isEmpty) {