usr bin env python coding utf-8 import sys sys path append src import

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
#!/usr/bin/env python
# -*- coding: utf-8 -*-
import sys
sys.path.append('../src/')
import sqlalchemy as sa
import sqlalchemy.ext.declarative
import catbot.core.models as cm
#import models as cm
engine = sa.create_engine('postgres://catbot:catbot@localhost/catbot', echo=True)
meta = cm.Base.metadata
meta.drop_all(bind=engine)
meta.create_all(bind=engine)