summaryrefslogtreecommitdiff
path: root/init_db.py
diff options
context:
space:
mode:
authoremkael <emkael@tlen.pl>2016-02-19 13:30:20 +0100
committeremkael <emkael@tlen.pl>2016-02-19 13:55:06 +0100
commit7a384588d8cf273ec078d3370eebc4087eb92d75 (patch)
tree5da331075a837d28753c9cd6517ca45fad9035d0 /init_db.py
parent53078b3f387216b21bf8ab27636511f4373dc9f6 (diff)
* calendar import script (from reddit markdown)
Diffstat (limited to 'init_db.py')
-rw-r--r--init_db.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/init_db.py b/init_db.py
index da3e641..7d48e80 100644
--- a/init_db.py
+++ b/init_db.py
@@ -1,16 +1,16 @@
import sys
from rcal.db import Session
-from rcal.model import Base
+from rcal.model import BASE
def main():
session = Session.create()
if len(sys.argv) > 1 and sys.argv[1] == 'force':
- Base.metadata.drop_all(session.get_bind())
+ BASE.metadata.drop_all(session.get_bind())
- Base.metadata.create_all(session.get_bind())
+ BASE.metadata.create_all(session.get_bind())
if __name__ == '__main__':
main()