]> andersk Git - sql.git/blobdiff - lib/python/sql/db.py
daily_afs_backups only dumps databases with changes since last dump; moved to /srv
[sql.git] / lib / python / sql / db.py
index 70e1ad4119c2c5b788cff205d59bce239d1e8c36..ba4adfd0247a80356246d883d2b70107e4efffd9 100755 (executable)
@@ -1,7 +1,16 @@
-from elixir import Entity, Field, String, Integer, DateTime, options, metadata, setup_all, session
+from elixir import Entity, Field, String, Text, Integer, DateTime, options, metadata, setup_all, session
 from sqlalchemy import create_engine, func
 options.options_defaults['shortnames'] = True
 
+class Backup(Entity):
+    db = Field(String(256), primary_key=True)
+    skip_reason = Field(String(256), nullable=True)
+    skip_date = Field(DateTime(), nullable=True)
+    dump_path = Field(String(512), nullable=True)
+    dump_errnum = Field(Integer(4), nullable=True)
+    dump_errstr = Field(Text(), nullable=True)
+    dump_date = Field(DateTime(), nullable=True)
+
 metadata.bind = create_engine('mysql://sql.mit.edu/mitsql?read_default_group=mysql', pool_recycle=True)
 
 if __name__ == '__main__':
This page took 0.114997 seconds and 4 git commands to generate.