所以我在docker容器上运行flyway,flyway无法找到我的迁移文件夹。
我已经这样定义它:
flyway.locations=filesystem:user/path/to/my/project/common/migrations/
并且在运行docker容器时更改文件路径也会产生相同的错误。
操作系统是Ubuntu 18.04。
错误消息:
migrate_1 | WARNING: Flyway upgrade recommended: PostgreSQL 12.1 is newer than this version of Flyway and support has not been tested.
migrate_1 | WARNING: Skipping filesystem location:/user/path/to/my/project/common/migrations (not found)
更新:更改文件路径不再起作用。始终运行docker-compose up会产生具有相同文件路径位置的相同错误。
我想出了答案。在docker-compose.yml上有一行也说明了路径。您不应该将其设置为double,因为flyway.conf旨在匹配路径。删除了它,flyway默认为默认位置/flyway6.1.4/sql。