标签:rom details env 数据库文件 csdn air man name config
https://blog.csdn.net/kevin_qq/article/details/51777190
这个方法可以:
https://www.cnblogs.com/caicairui/p/7821586.html
import os from app import create_app, db from flask_script import Manager, Shell from flask_migrate import Migrate, MigrateCommand # app = create_app(os.getenv(‘FLASK_CONFIG‘) or ‘default‘) app = create_app() manager = Manager(app) migrate = Migrate(app, db) manager.add_command(‘db‘, MigrateCommand) if __name__ == ‘__main__‘: manager.run()
第一次使用:
后缀更新:
(venv) $ python manage.py db init
(venv) $ python manage.py db migrate
(venv) $ python manage.py db upgrade
标签:rom details env 数据库文件 csdn air man name config
原文地址:https://www.cnblogs.com/1a2a/p/9768633.html