英文:
Flyway scripts failing with two schema_version tables in a single schema[Resolved ]
问题
我有两个微服务(考虑A和B),它们使用相同的数据库架构,但有单独的架构版本表schema_version_a和schema_version_b。
每当微服务A创建schema_version_a并成功执行Flyway脚本时,微服务B会失败,反之亦然。
由于我使用的是Flyway 5,schema_version_a表的第一个条目是
1 1.0 init SQL V1_0__init.sql -157200059 root 2020-01-06 16:06:41 3905 1
这是正确的,
但对于微服务B,schema_version_b的条目与Flyway 3的版本相符。
'1','1','<< Flyway Baseline >>','BASELINE','<< Flyway Baseline >>',NULL,'root','2020-01-06 16:08:20','0','1'
有人可以解释为什么会发生这种情况吗?
英文:
I have two micro services (Consider A and B) are using same database schema with separate schema version tables schema_version_a ,schema_version_b.
Whenever microservice A is creating schema_version_a and executing flyway secripts successfully , microservice B is failing and vice versa.
As I am using flyway 5 schema_version_a table's 1st entry is
1 1.0 init SQL V1_0__init.sql -157200059 root 2020-01-06 16:06:41 3905 1
which is correct ,
but for Mircoservice B schema_version_b entry is as per flyway 3.
'1', '1', '<< Flyway Baseline >>', 'BASELINE', '<< Flyway Baseline >>', NULL, 'root', '2020-01-06 16:08:20', '0', '1'
Can anyone explain why this is happening ?
答案1
得分: 0
使用baselineVersion属性解决了flyway的问题。
英文:
Using baselineVersion property for flyway resolved the issue
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论