The change of the wrreportcache table caused necessary changes in this module.
[philipp/winterrodeln/wrpylib.git] / wrpylib / wrmwdb.py
index 5a0879b3cdab9f9c6dc946751c85ba36475a9d36..82bad4a4c59175dd42e64baddd56edb51c9b55ae 100644 (file)
@@ -18,7 +18,7 @@ def wrreport_table(metadata):
     """
     return Table("wrreport", metadata,
     Column("id", types.Integer, primary_key=True),
-    Column("page_id", types.Integer, schema.ForeignKey('wrsleddingcache.page_id')),
+    Column("page_id", types.Integer, schema.ForeignKey('wrsledruncache.page_id')),
     Column("page_title", types.Unicode(255), nullable=False),
     Column("date_report", types.Date),
     Column("date_entry", types.DateTime, nullable=False),
@@ -112,3 +112,21 @@ def wrinncache_table(metadata):
     )
 
 
+def wrreportcache_table(metadata):
+    """Returns the sqlalchemy Table representing the "wrreportcache" Winterrodeln table in MediaWiki.
+    Current table definition.
+    * version 1.5 (introduction)
+    :param metadata: metadata = sqlalchemy.MetaData()
+    """
+    return Table("wrreportcache", metadata,
+    Column("page_id", types.Integer, primary_key=True),
+    Column("page_title", types.Unicode(255), nullable=False),
+    Column("report_id", types.Integer),
+    Column("date_report", types.Date),
+    Column("condition", types.Integer),
+    Column("description", types.Unicode),
+    Column("author_name", types.Unicode(30)),
+    Column("author_username", types.Unicode(30))
+    )
+
+