question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Rollback is broken

See original GitHub issue

Description Rollback does not work, with tags or with count, doesn’t respect rollback sql file.

To Reproduce

    <changeSet id="5" author="ale">
        <tagDatabase tag="before_provisioning_1"/>
    </changeSet>

    <changeSet id="6" author="ale">
        <sqlFile path="add_two_columns_to_table_a_create_two_new_tables_add_foreign_key.sql" relativeToChangelogFile="true"/>

        <!-- this rollback is for reference only, liquibase rollback is broken , doesn't jump to previous changeset,
         doesn't undo changes  -->
        <rollback>
            <sqlFile path="some_rollback_script_which_works_against_db.sql" relativeToChangelogFile="true"/>
        </rollback>
    </changeSet>

liquibase rollbackSQL before_provisioning_1  --changeLogFile liquibase.xml --url="jdbc:mysql://localhost:3306/credentials" --classpath="/home/ale/liquibase/src/java/mysql-connector-java-5.1.47.jar" --password=some --username=root 
Liquibase Community 3.8.7 by Datical
--  *********************************************************************
--  Rollback to 'before_provisioning_1' Script
--  *********************************************************************
--  Change Log: liquibase.xml
--  Ran at: 11/03/20 16:23
--  Against: root@172.17.0.1@jdbc:mysql://localhost:3306/credentials
--  Liquibase version: 3.8.7
--  *********************************************************************

--  Lock Database
UPDATE credentials.DATABASECHANGELOGLOCK SET `LOCKED` = 1, LOCKEDBY = '172.17.0.1 (172.17.0.1)', LOCKGRANTED = '2020-03-11 16:23:18.432' WHERE ID = 1 AND `LOCKED` = 0;

--  Release Database Lock
UPDATE credentials.DATABASECHANGELOGLOCK SET `LOCKED` = 0, LOCKEDBY = NULL, LOCKGRANTED = NULL WHERE ID = 1;
As you can see the above is empty, it refuses to execute contents of mysql file.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:15 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
SteveDoniecommented, Mar 12, 2020

What I typically do when running from the command line is I create a file named liquibase.properties in the directory where I will be running the command, and in that file I put things like the changeLogFile, url, etc. This makes running commands much easier. This is described in more detail in the documentation at https://www.liquibase.org/documentation/config_properties.html

If you don’t use a properties file, the correct format for the command line would be to have the parameters first, then the command. You have liquibase <command> <global parameters> but the command line expects liquibase <global parameters> <command>.

0reactions
kataggartcommented, Dec 21, 2021

@antonalechnovic Thanks again for posting your issue. As this has been inactive for a while, I am going to close the issue. Please don’t hesitate to open a new issue if you continue to face this issue. Thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Here is What to Do if Windows Rollback is Not Working
Windows rollback is not working? · 1. Restart PC · 2. Use BIOS Options · 3. Use Reserve Image · 4. Wait ......
Read more >
Known Issue Rollback: Here's how Windows 10 is dealing ...
Known Issue Rollback: Here's how Windows 10 is dealing with broken updates ... Known Issue Rollback helps developers undo the problematic ...
Read more >
2003441 – dnf rollback is broken - Red Hat Bugzilla
Cause: otopi's 'minidnf.py' was broken due to backwards-incompatible changes in dnf, around transaction rollback. Consequence: If engine-setup, ...
Read more >
Rollback feature is very broken- priority not received : r/XMage
95% of the time, it causes priority to not be passed back to one of the players, and additional rollbacks don't help. I've...
Read more >
Rollback is not working in @Transactional annotated service ...
rollback is not working and I dont know why. This is my Hibernate Configuration: package newp; import java.util.Properties; import javax.sql.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found