From a0552503a34a3d48e2c89a8432e42b997fbc2ab8 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Mon, 29 Jan 2018 13:26:23 +0100 Subject: [PATCH] Add a product id to allow the edit of product names --- database.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/database.py b/database.py index afe1fb8..2b2893f 100644 --- a/database.py +++ b/database.py @@ -59,8 +59,10 @@ class User(TableDeclarativeBase): class Product(TableDeclarativeBase): """A purchasable product.""" + # Product id + id = Column(Integer, primary_key=True) # Product name - name = Column(String, primary_key=True) + name = Column(String) # Product description description = Column(Text) # Product price, if null product is not for sale