如果报错是
INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. INFO [alembic.env] No changes in schema detected.
可以试试在navicate里把已经有的表删掉
然后再重新执行flask db migrate -m “first commit”
然后就对了
INFO [alembic.runtime.migration] Context impl MySQLImpl. INFO [alembic.runtime.migration] Will assume non-transactional DDL. INFO [alembic.autogenerate.compare] Detected added table 'user' INFO [alembic.autogenerate.compare] Detected added table 'article' INFO [alembic.autogenerate.compare] Detected added table 'user_extension' Generating D:projectspycharm_projectflask-ORMmigrationsversions247b9194c47f_first_commit.py ... done
再来记录一下整个过程
# 添加字段 flask db migrate -m "add password to user" flask db upgrade
# 删除字段 flask db migrate -m "remove password from user" flask db upgrade



