0

我需要标记一个变更集以进行回滚。

试过这个

方式一

docker run --rm -v $(pwd):/liquibase/ -e "LIQUIBASE_URL=jdbc:postgresql://host/dbname" -e "LIQUIBASE_USERNAME=username" -e "LIQUIBASE_PASSWORD=pass" webdevops/liquibase:postgres tag -Dliquibase.tag='version0.1'

或者

docker run --rm -v $(pwd):/liquibase/ -e "LIQUIBASE_URL=jdbc:postgresql://host/dbname" -e "LIQUIBASE_USERNAME=username" -e "LIQUIBASE_PASSWORD=pass" webdevops/liquibase:postgres tag 'version0.1'

在运行这个我得到

/入口点:第 172 行:执行:标签:未找到

方式二

<changeSet  id="3"  author="nvoxland">
        <tagDatabase  tag="version_1.3"/>    
            <addLookupTable  
                existingTableName="person"  existingColumnName="state"  
                newTableName="state"  newColumnName="id"  newColumnDataType="char(2)"/>  
    </changeSet>  

或者

    <changeSet  id="3"  author="nvoxland">
        <tagDatabase  tag="version_1.3"/>    
        <addLookupTable  
            existingTableName="person"  existingColumnName="state"  
            newTableName="state"  newColumnName="id"  newColumnDataType="char(2)"/>  
    </changeSet>  

错误

发现以元素“addLookupTable”开头的无效内容。

我如何标记和回滚?

4

1 回答 1

0

您可以将 tagDatabase 分离为它自己的变更集吗?就像是


    <changeSet  id="3"  author="mo">
        <tagDatabase  tag="version_1.3"/>
    </changeSet> 

于 2020-05-28T17:14:19.740 回答