[billreminder] Get the relationship betwen Bill and Category right.



commit 5e7dffc87515a596285363730acb357f095a5148
Author: Og B. Maciel <ogmaciel gnome org>
Date:   Thu Nov 26 18:22:46 2009 -0500

    Get the relationship betwen Bill and Category right.

 src/db/entities.py |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/db/entities.py b/src/db/entities.py
index 75962ee..204e817 100644
--- a/src/db/entities.py
+++ b/src/db/entities.py
@@ -10,7 +10,6 @@ class Category(Base):
     id = Column(Integer, primary_key=True)
     name = Column(String(length=255, convert_unicode=True))
     color = Column(String(length=6, convert_unicode=True))
-    bill_id = Column(Integer, ForeignKey('bills.id'))
 
     def __init__(self, name, color=None):
         self.name = name
@@ -31,6 +30,7 @@ class Bill(Base):
     paid = Column(Boolean)
     repeats = Column(Boolean)
 
+    catId = Column(Integer, ForeignKey('categories.id'))
     category = relation(Category, backref=backref('bills', order_by=id))
 
     def __init__(self, payee, amount, dueDate, notes=None, paid=False, repeats=False):



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]