提交 cb6bce4e 编写于 作者: X Xu Peng

feat(env): add manager for db operation and add dot env.example

上级 b3e80f73
.idea/
.ycm_extra_conf.py
__pycache__
.env
DEBUG=True
SQLALCHEMY_TRACK_MODIFICATIONS=False
SECRET_KEY=test
SQLALCHEMY_DATABASE_URI=mysql+pymysql://vecwise@127.0.0.1:3306/vecdata
ROW_LIMIT=10000000
DATABASE_DIRECTORY=/tmp
from flask_script import Manager
from engine import db, app
manager = Manager(app)
@manager.command
def create_all():
db.create_all()
@manager.command
def drop_all():
db.drop_all()
@manager.command
def recreate_all():
db.drop_all()
db.create_all()
if __name__ == '__main__':
manager.run()
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册