Properly load the ingredient images

This commit is contained in:
Roland Geider
2026-04-29 20:53:50 +02:00
parent 3fbdaac4b3
commit 5bf2dd22ee
4 changed files with 27 additions and 6 deletions

View File

@@ -4433,6 +4433,10 @@ class $WorkoutLogTableTable extends WorkoutLogTable with TableInfo<$WorkoutLogTa
DriftSqlType.int,
data['${effectivePrefix}routine_id'],
)!,
sessionId: attachedDatabase.typeMapping.read(
DriftSqlType.string,
data['${effectivePrefix}session_id'],
),
repetitions: attachedDatabase.typeMapping.read(
DriftSqlType.double,
data['${effectivePrefix}repetitions'],
@@ -6733,7 +6737,7 @@ class $IngredientImageTableTable extends IngredientImageTable
String get aliasedName => _alias ?? actualTableName;
@override
String get actualTableName => $name;
static const String $name = 'nutrition_ingredientimage';
static const String $name = 'nutrition_image';
@override
VerificationContext validateIntegrity(
Insertable<IngredientImage> instance, {

View File

@@ -95,7 +95,7 @@ const PowersyncIngredientTable = ps.Table(
@UseRowClass(IngredientImage)
class IngredientImageTable extends Table {
@override
String get tableName => 'nutrition_ingredientimage';
String get tableName => 'nutrition_image';
IntColumn get id => integer()();
TextColumn get uuid => text()();
@@ -113,7 +113,7 @@ class IngredientImageTable extends Table {
}
const PowersyncIngredientImageTable = ps.Table(
'nutrition_ingredientimage',
'nutrition_image',
[
ps.Column.text('uuid'),
ps.Column.integer('ingredient_id'),