deleteEverything method
Deletes all rows from every table, fully resetting the database.
Uses Drift's row-level deletes (not drop/createAll) so reactive
.watch() streams are notified of the change. Migrator-based drops
bypass change tracking and would leave watchers serving stale data.
Implementation
Future<void> deleteEverything() async {
await transaction(() async {
for (final entity in allSchemaEntities.toList().reversed) {
if (entity is TableInfo) {
await delete(entity).go();
}
}
});
}