fix: product.image column name

This commit is contained in:
Vlad Stan 2023-03-03 12:00:49 +02:00
parent 6bb6a9d02a
commit 9a82577493
2 changed files with 2 additions and 2 deletions

View file

@ -222,7 +222,7 @@ async def update_product(user_id: str, product: Product) -> Product:
await db.execute(
f"""
UPDATE nostrmarket.products set name = ?, images = ?, price = ?, quantity = ?, category_list = ?, meta = ?
UPDATE nostrmarket.products set name = ?, image = ?, price = ?, quantity = ?, category_list = ?, meta = ?
WHERE user_id = ? AND id = ?
""",
(

View file

@ -43,7 +43,7 @@ async def m001_initial(db):
id TEXT PRIMARY KEY,
stall_id TEXT NOT NULL,
name TEXT NOT NULL,
images TEXT DEFAULT '[]',
image TEXT DEFAULT,
price REAL NOT NULL,
quantity INTEGER NOT NULL,
category_list TEXT DEFAULT '[]',