liquibase迁移脚本未在deploynodes中执行



我的workflows/src/main/resources/migration文件夹中有两个liquibase迁移脚本。当我运行deployNodes任务时,它会运行模式迁移。但是,它不会执行我的脚本(之后会丢失表(。我还尝试手动运行run-migration-scripts --core-schemas --app-schemas命令,但它仍然不执行脚本。知道是什么导致了这种行为吗?我用的是corda 4.6。

我还在渐变文件中设置了runSchemaMigration = true

Ashutosh给出了与我相同的建议。

getMigrationResource可以用类似的东西来定义

public class IOUSchemaV1 extends MappedSchema {
public IOUSchemaV1() {
super(IOUSchema.class, 1, ImmutableList.of(PersistentIOU.class));
}
@Nullable
@Override
public String getMigrationResource() {
return "iou.changelog-master";
}

来源:https://www.corda.net/blog/cordapp-database-upgrade-migration-production-perspective/

对于以后发现这个的人,这里有文档页面:https://api.corda.net/api/corda-os/4.6/html/api/javadoc/net/corda/core/schemas/CommonSchemaV1.html

希望这能帮你解决问题,祝好运

最新更新