Hi,
I’m trying make the rollbackdate in liquibase using maven with
this command:
mvn liquibase:rollback -Dliquibase.rollbackDate=“31/03/2015 13:27:27.708852”
The problem is that liquibase is erasing all in the database, all
lines of the “databasechangelog”.
Example:
______________________________________________________________________________________
“1”;“user1”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.0.sql”;“2015-03-31 13:24:27.629078”;1;“EXECUTED”;“7:fb66ab871574ab62f972be32c294940f”;“sql”;"’’";"";“3.3.2”
“2”;“user2”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.0.sql”;“2015-03-31 13:24:27.66359”;2;“EXECUTED”;“7:95a4c1c692532b5f1f3686b903eefb18”;“sql”;"’’";"";“3.3.2”
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.1.sql”;“2015-03-31 13:24:27.69319”;3;“EXECUTED”;“7:e7c3541d5c0baed2ef9b04017786ca6b”;“sql”;"’’";"";“3.3.2”
“1”;“user1”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.2.sql”;" 2015-03-31 13:24:27.708852 “;4;“EXECUTED”;“7:b6f4e79c9d6f194fb4f8dd17ff6fb225”;“sql”;”’’";“versao_1.0”;“3.3.2”
–> ROLLBACK MUST BE UNTIL HERE, like running direct on liquibase.
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.3.sql”;“2015-03-31 18:48:10.438653”;5;“EXECUTED”;“7:64cdb84f9c54f4256159f510109cf2d0”;“sql”;"’’";"";“3.3.2”
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.4.sql”;“2015-03-31 18:48:10.485542”;6;“EXECUTED”;“7:86a3b6d23180e5717052eb160273e990”;“sql”;"’’";"";“3.3.2”
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.5.sql”;“2015-03-31 18:48:10.513993”;7;“EXECUTED”;“7:4ed740502a27c978f4b5310d36f154ff”;“sql”;"’’";"";“3.3.2”
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.6.sql”;“2015-03-31 18:48:10.535638”;8;“EXECUTED”;“7:53531736d961464555da6d1f2995e663”;“sql”;"’’";"";“3.3.2”
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.7.sql”;“2015-03-31 18:48:10.557478”;9;“EXECUTED”;“7:491ddab01932fdb3398d1029ba75f47c”;“sql”;"’’";"";“3.3.2”
“3”;“user3”;“c:/Users/jmorais/workspace/Hongkong/aps-webservice/aps-database/src/main/sql/script1.8.sql”;“2015-03-31 18:48:10.582068”;10;“EXECUTED”;“7:f44e945fc69b6ab83dbcf5597ad568ca”;“sql”;"’’";“versao_2.0”;“3.3.2”
______________________________________________________________________________________
But, everything done is rollbacked.
Ps -> Not is a problem with the date format, I think, because changing the format the liquibase give me a error.
When a use by tag, I have no problem:
mvn liquibase:rollback -Dliquibase.rollbackTag=versao_1.0
In this case, I stay with 4 scripts, until the script1.2.
Somebody can help me? Why the rollbackDate is erasing all? I didn’t find nothing in the internet.
Thanks in advance,