From 109db03edbabf79988fdbc7cee7e3a338ee90bec Mon Sep 17 00:00:00 2001 From: oysteini Date: Tue, 11 May 2010 18:02:45 +0000 Subject: [PATCH] Fikset datatype for kolonnen PurchaseEntry.product_bar_code. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Glemte visst å endre denne da jeg endret Product.bar_code tidligere. --- db.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db.py b/db.py index 366e114..1b4f617 100644 --- a/db.py +++ b/db.py @@ -55,7 +55,7 @@ class PurchaseEntry(Base): __tablename__ = 'purchase_entries' id = Column(Integer, primary_key=True) purchase_id = Column(Integer,ForeignKey("purchases.id")) - product_bar_code = Column(Integer,ForeignKey("products.bar_code")) + product_bar_code = Column(String(13),ForeignKey("products.bar_code")) amount = Column(Integer) product = relationship(Product,backref="purchases")