app=Flask(name) db=SQLAlchemy(app) migrate=Migrate(app,db)
migrate的命令:
初始化
flask db init
生成迁移脚本
flask db migrate -m 'add note '
更新
flask db upgrade
app=Flask(name) db=SQLAlchemy(app) migrate=Migrate(app,db)
flask db init
flask db migrate -m 'add note '
flask db upgrade