manage.py 文件源码

python
阅读 25 收藏 0 点赞 0 评论 0

项目:research-eGrader 作者: openstax 项目源码 文件源码
def reset_db():
    if prompt_bool(
            'Are you sure you want to lose all your data for {0}'.format(
                app.config['SQLALCHEMY_DATABASE_URI'].split('@')[1])
    ):
        from alembic.command import downgrade, upgrade
        from alembic.config import Config as AlembicConfig
        config = AlembicConfig('alembic.ini')
        downgrade(config, 'base')
        upgrade(config, 'head')
        print('Database has been reset')
评论列表
文章目录


问题


面经


文章

微信
公众号

扫码关注公众号