Ashwini Raghu
Ashwini Raghu

Reputation: 21

How to delete last executed liquibase changeset from database

I accidently ran this changeset, but I want to do some modification to this changeset. This is still in development mode, so I do not want to add another changeset to revert these changes. I am planning to delete PAYLOAD_SIZE column from the table by executing sql query directly in database. After that I want to run the changeset again by doing some modification.

From the liquibase documentation I understand that liquibase creates an entry in table DATABASECHANGELOG for successfully executed changeset. So I am planning to delete the entry corresponding to changeset "ADD_PAYLOADSIZE" from table DATABASECHANGELOG. Will it cause any inconsistency by deleting entry from DATABASECHANGELOG please suggest.

<changeSet author="*****" id="ADD_PAYLOADSIZE">
        <addColumn tableName="METER_DATA">
            <column name="PAYLOAD_SIZE" type="BIGINT" defaultValue="0"></column>
        </addColumn>
</changeSet>

Upvotes: 2

Views: 9188

Answers (1)

Aditi
Aditi

Reputation: 367

No, it wont cause any inconsistency as long as you make these two changes (manually delete the payload size column and remove the entry for this changeset from the DATABASECHANGELOG table)

Upvotes: 1

Related Questions