Liquibase校验和验证失败

时间:2016-05-24 08:39:38

标签: liquibase

我在Springboot应用程序中使用html, body{ height: 100%; } h1, h2, h3, p{ margin: 0px; } .container{ width:90%; } .top5 {margin-top: 5%;} .top7 {margin-top: 7%;} .top10{margin-top: 10%;} .top15{margin-top: 15%;} .top17{margin-top: 17%;} .top30{margin-top: 30%;} .vertical-center { height:100%; width:100%; text-align: center; /* align the inline(-block) elements horizontally */ } .vertical-center:before { /* create a full-height inline block pseudo=element */ content: ' '; display: inline-block; vertical-align: middle; /* vertical alignment of the inline element */ height: 100%; } .vertical-center > .container { max-width: 100%; display: inline-block; vertical-align: middle; /* vertical alignment of the inline element */ font: 16px/1 "Helvetica Neue", Helvetica, Arial, sans-serif; /* <-- reset the font property */ } @media (max-width: 768px) { .vertical-center:before { display: none; } } .vote-button{ border: solid 1px black; padding: 10px 0px; } .vacancy-summary{ border: 1px solid black; padding: 25px 0px; } 。我正在使用基于SQL的更改日志文件。添加新的更改集最终显示先前更改集的校验和验证错误。

初始更改日志文件 -

Liquibase (3.5.1)

添加这样的新变更集时 -

--liquibase formatted sql
--changeset tanmoy:1
create table serviceInstances (
    serviceId varchar(60),
    orgId  varchar(60),
    spaceId varchar(60),
    primary key (serviceId,orgId)
);

此错误日志导致迁移失败 -

--changeset tanmoy:2
create table serviceBindings (
    bindingId varchar(30) primary key,
    serviceId varchar(30),
    appId varchar(30),
    timeStamp BIGINT
);

不明白为什么上一个更改集的校验和已更改且未经过验证。是因为我在更改日志文件中添加了一个新的更改集吗?如果是,那么我该如何添加新的变更集?

1 个答案:

答案 0 :(得分:0)

在流程级别上,所有流程均已完成incrementally。例如,当我们创建一个表并想要对该表进行更改时,我们会为您提供一个新的增量编号。使用此数字,我们确定在创建的changes中创建的id。就像您要在问题中添加新内容一样。因此,您需要在liquibase.xml文件中增加<changeSet id="73" author="fcelik"> <comment>This change adds to customer_order table.</comment> <addColumn tableName="customer_order"> <column name="owner_id" type="BIGINT"> <constraints nullable="false"/> </column> </addColumn> </changeSet> 。如果您对当前的图表进行了更改,请执行以下操作。

liquabase.xml

您的文件必须是customer_order的不匹配值。创建文件之间要执行的操作(通常跟踪增量路径。)。例如,我在此处向<addColumn>表中添加了新列。请注意,使用标记时props.translation

相关问题