blob: 7d48e80de6baad1dbf5ce752bdf6517cd17973b8 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
import sys
from rcal.db import Session
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.create_all(session.get_bind())
if __name__ == '__main__':
main()
|