并尝试在jhipster中回滚liquibase的标签,但我没有成功。
def liquibaseCommand(command) {
javaexec {
if (OperatingSystem.current().isWindows()) {
classpath files(pathingLiquibaseJar.archivePath)
} else {
classpath sourceSets.main.runtimeClasspath
classpath configurations.liquibase
}
main = "liquibase.integration.commandline.Main"
args "--changeLogFile=src/main/resources/config/liquibase/changelog/" + buildTimestamp() +"_changelog.xml"
args "--referenceUrl=hibernate:spring:cl.databin.fact.domain?dialect=org.hibernate.dialect.PostgreSQL82Dialect&hibernate.physical_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringPhysicalNamingStrategy&hibernate.implicit_naming_strategy=org.springframework.boot.orm.jpa.hibernate.SpringImplicitNamingStrategy"
args "--username=postgres"
args "--password=mypass"
args "--url=jdbc:postgresql://localhost:5432/testdbjhipster"
args "--driver=org.postgresql.Driver"
args command
}
}
task rollbackTag(dependsOn: initPaths) {
doLast {
liquibaseCommand("rollback")
}
}
当我执行
时 ./gradlew rollbackTag -PliquibaseCommandValue=1.0.0-0.1
错误liquibase - 回滚需要回滚标记
谢谢!