diff options
author | emkael <emkael@tlen.pl> | 2016-02-19 13:30:20 +0100 |
---|---|---|
committer | emkael <emkael@tlen.pl> | 2016-02-19 13:55:06 +0100 |
commit | 7a384588d8cf273ec078d3370eebc4087eb92d75 (patch) | |
tree | 5da331075a837d28753c9cd6517ca45fad9035d0 /init_db.py | |
parent | 53078b3f387216b21bf8ab27636511f4373dc9f6 (diff) |
* calendar import script (from reddit markdown)
Diffstat (limited to 'init_db.py')
-rw-r--r-- | init_db.py | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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() |