Added a definition for the mediawiki table "user".
authorphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 21 Apr 2013 20:09:27 +0000 (20:09 +0000)
committerphilipp <philipp@7aebc617-e5e2-0310-91dc-80fb5f6d2477>
Sun, 21 Apr 2013 20:09:27 +0000 (20:09 +0000)
git-svn-id: http://www.winterrodeln.org/svn/wrpylib/trunk@1377 7aebc617-e5e2-0310-91dc-80fb5f6d2477

wrpylib/mwdb.py

index 7e7da44cfc65b18666601ff4ab9e2135397c4a5f..03a720aafb2834d0964f88e80c3894c9a068577c 100644 (file)
@@ -57,6 +57,28 @@ def text_table(metadata):
     )
 
 
+def user_table(metadata):
+    """Returns the sqlalchemy Table representing the "user" table in MediaWiki.
+    :param metadata: metadata = sqlalchemy.MetaData()
+    """
+    return Table('user', metadata,
+    Column("user_id", types.Integer, primary_key=True),
+    Column("user_name", types.Unicode(255), nullable=False),
+    Column("user_real_name", types.Unicode(255), nullable=False),
+    # "user_password"
+    # "user_newpassword"
+    # "user_newpass_time"
+    Column("user_email", types.Unicode, nullable=False),
+    # "user_touched"
+    # "user_token"
+    # "user_email_authenticated"
+    # "user_email_token"
+    # "user_email_token_expires"
+    # "user_registration"
+    # "user_editcount"
+    )
+
+
 def categorylinks_table(metadata):
     """Returns the sqlalchemy Table representing the "categorylinks" table in MediaWiki.
     :param metadata: metadata = sqlalchemy.MetaData()