import 'package:drift/drift.dart'; import 'enums.dart'; import 'tables.dart'; part 'database.g.dart'; /// The encrypted local inventory database (SQLCipher via an injected executor). /// /// The executor is passed in so production wires SQLCipher while tests can use /// an in-memory database — the schema and queries are identical either way. @DriftDatabase( tables: [ Varieties, VarietyVernacularNames, Species, SpeciesCommonNames, Lots, GerminationTests, Movements, Parties, Attachments, ExternalLinks, ], ) class AppDatabase extends _$AppDatabase { AppDatabase(super.e); @override int get schemaVersion => 1; @override MigrationStrategy get migration => MigrationStrategy( onCreate: (m) async => m.createAll(), // Step-by-step upgrades (from1To2, …) are generated into // schema_versions.dart when schemaVersion is bumped. See data-model §5. ); }