feat: alphabet list, change Layout etc

This commit is contained in:
2026-10-11 20:37:59 +02:00
parent 489896305d
commit 072f560989
31 changed files with 1847 additions and 832 deletions
+9 -1
View File
@@ -30,6 +30,10 @@ class Products extends Table {
IntColumn get lowStockThreshold => integer()();
/// Products like tap water that are never counted; their stock is ignored.
BoolColumn get infiniteStock =>
boolean().withDefault(const Constant(false))();
IntColumn get priceInCents => integer()();
TextColumn get imagePath => text().nullable()();
@@ -200,7 +204,7 @@ class AppDatabase extends _$AppDatabase {
AppDatabase([QueryExecutor? executor]) : super(executor ?? _openConnection());
@override
int get schemaVersion => 13;
int get schemaVersion => 14;
@override
MigrationStrategy get migration {
@@ -295,6 +299,10 @@ class AppDatabase extends _$AppDatabase {
await _backfillPurchaseRows();
await _deleteOrphanedPurchaseRows();
}
if (from < 14 && !await hasTableColumn('products', 'infinite_stock')) {
await migrator.addColumn(products, products.infiniteStock);
}
},
);
}