我正在评估 SQLAlchemy-migrate 作为数据库迁移工具。我的 db_version 为 0,存储库版本为 1。
$ python manage.py db_version --url=postgresql://localhost:5432/my_db
0
$ python manage.py version
1
我只有一个未应用的版本:
./versions/001_initial_schema_postgres_upgrade.sql
我运行了迁移工具,但它不会升级,因为它找不到版本:
$ python manage.py upgrade --version 1 --url=postgresql://localhost:5432/my_db
"There is no script for %d version" % self.version
AssertionError: There is no script for 1 version
我是不是做错了什么,导致迁移工具找不到我的更改脚本?