admin管理员组文章数量:1344180
I have been having trouble getting rollback-count
to work correctly. I have the following changelog.sql
script
--liquibase formatted sql
--changeset fritz:55
CREATE TABLE RollbackTestFive(
Id INT PRIMARY KEY,
Name VARCHAR(50)
)
--rollback drop table RollbackTestFive
--changeset fritz:56
CREATE TABLE RollbackTestSix(
Id INT PRIMARY KEY,
Name VARCHAR(50)
)
--rollback drop table RollbackTestSix
And after running the update and history command I get this output.
| Deployment ID | Update Date | Changelog Path | Changeset Author | Changeset ID | Tag |
+---------------+-----------------+-----------------------------+------------------+--------------+-----+
| 3715052363 | 4/3/25, 2:17 PM | changelog/changelog.sql | fritz | 55 | |
+---------------+-----------------+-----------------------------+------------------+--------------+-----+
| 3715052363 | 4/3/25, 2:17 PM | changelog/changelog.sql | fritz | 56 | |
+---------------+-----------------+-----------------------------+------------------+--------------+-----+
Then when I try to run the rollback as such I get this output
./liquibase --log-level=INFO rollback-count --count=2 --password={pwd} --username={user} --changelog-file=changelog/changelog.sql --driver=com.microsoft.sqlserver.jdbc.SQLServerDriver --url=jdbc:sqlserver://127.0.0.1:1111;encrypt=false;database=test
[2025-04-03 14:18:12] INFO [liquibase.ui] Liquibase Version: 4.27.0
Liquibase Open Source 4.27.0 by Liquibase
[2025-04-03 14:18:12] INFO [liquibase.ui] Liquibase Open Source 4.27.0 by Liquibase
[2025-04-03 14:18:12] INFO [liquibase.integration] Starting command execution.
[2025-04-03 14:18:12] WARNING [liquibasemand] Ignoring the global liquibase.driver value in favor of the command value.
[2025-04-03 14:18:12] INFO [liquibase.database] Set default schema name to dbo
[2025-04-03 14:18:12] INFO [liquibase.changelog] Reading from DATABASECHANGELOG
[2025-04-03 14:18:12] INFO [liquibase.lockservice] Successfully acquired change log lock
[2025-04-03 14:18:12] INFO [liquibase.changelog] Reading from DATABASECHANGELOG
INFO: 0 changesets rolled back.
[2025-04-03 14:18:12] INFO [liquibase.ui] INFO: 0 changesets rolled back.
[2025-04-03 14:18:12] INFO [liquibasemand] Rollback command completed successfully.
[2025-04-03 14:18:12] INFO [liquibase.lockservice] Successfully released change log lock
[2025-04-03 14:18:13] INFO [liquibasemand] Command execution complete
Liquibase command 'rollback-count' was executed successfully.
[2025-04-03 14:18:13] INFO [liquibase.ui] Liquibase command 'rollback-count' was executed successfully
I have tried to run rollback-count-sql
to preview the SQL script it would run, but it shows no rollback script being generated. Not sure where I went wrong.
本文标签: Liquibase rollbackcount not rolling back changesStack Overflow
版权声明:本文标题:Liquibase rollback-count not rolling back changes - Stack Overflow 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1743738882a2530523.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论