diff Mapping.py @ 43:12ed8b5fa08c

first system preference: configure app to stat maximized.
author Dirk Olmes <dirk@xanthippe.ping.de>
date Fri, 14 May 2010 08:31:46 +0200
parents aaec263f07ca
children a8442c3487b5
line wrap: on
line diff
--- a/Mapping.py	Fri May 14 08:08:17 2010 +0200
+++ b/Mapping.py	Fri May 14 08:31:46 2010 +0200
@@ -1,6 +1,7 @@
 
 from Feed import Feed
 from FeedEntry import FeedEntry
+from Preference import Preference
 from sqlalchemy import Column
 from sqlalchemy import DateTime
 from sqlalchemy import ForeignKey
@@ -45,6 +46,12 @@
         Column("updated", DateTime),
         Column("feed_id", Integer, ForeignKey("feed.pk"))
     )
+    
+    preferencesTable = Table("preference", metadata,
+        Column("pk", Integer, primary_key=True),
+        Column("key", String(255), nullable=False),
+        Column("value", String(255), nullable=False)
+    )
 
     metadata.create_all()
 
@@ -54,3 +61,4 @@
             "entries" : relation(FeedEntry, backref="feed")
         }
     )
+    mapper(Preference, preferencesTable)