From 9a82577493eaa248c847a256fe9f7a70eb297123 Mon Sep 17 00:00:00 2001 From: Vlad Stan Date: Fri, 3 Mar 2023 12:00:49 +0200 Subject: [PATCH] fix: `product.image` column name --- crud.py | 2 +- migrations.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/crud.py b/crud.py index 6ad0139..990b9ad 100644 --- a/crud.py +++ b/crud.py @@ -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 = ? """, ( diff --git a/migrations.py b/migrations.py index 696e584..680c3cc 100644 --- a/migrations.py +++ b/migrations.py @@ -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 '[]',