Rollback to previous changeset

Sure, that makes sense. I’m unable to edit those posts at this time.

Hello,

I’m following this syntax for SQL but is this possible for XML files. In our installation we use masterchangelog.xml that contains changeset definitions that point to a changelog file that is also XML. The change log file contains a list of files one for tables, procedures, views, procedures etc. In each of these files is the include statement for the .sql file that gets executed. I’m not seeing a way to reference a file for a rollback that’s inside a file that is included in a changelog XML that’s defined in a masterchangelog XML.
example master-changelog

<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog

    xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9

     http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">



<changeSet author="itw-?-test-1B-start" id="itw-?-test-rollback-1-4.1.0-start">

    <tagDatabase tag="itw-?-test-rollback-1-4.1.0-start"/>

</changeSet>



<include file="changelogs/test-rollback-1B/db-changelog-ddl\_?\_table_ddl.xml"/>

<include file="changelogs/test-rollback-1B/db-changelog-ddl\_?\_table_dml.xml"/>

<include file="changelogs/test-rollback-1B/db-changelog-ddl\_?\_procedure.xml"/>

<include file="changelogs/test-rollback-1B/db-changelog-ddl\_?\_streams.xml"/>

<include file="changelogs/test-rollback-1B/db-changelog-ddl\_?\_task.xml"/>

<include file="changelogs/test-rollback-1B/db-changelog-ddl\_?\_view.xml"/>



<changeSet author="itw-?-test-rollback-1B-start" id="itw-?-test-rollback-1-3.1.0-end">

    <tagDatabase tag="itw-?-test-rollback-1-4.1.0-end"/>

</changeSet>

sample changelog

sample changlog file

<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog

    xmlns="http://www.liquibase.org/xml/ns/dbchangelog/1.9"

    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"

    xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog/1.9

 http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-1.9.xsd">



<include file="databasechanges/?/procedures/ddl_sp_rollback_proc_1.sql" />

<include file="databasechanges/?/procedures/ddl_sp_rollback_proc_2.sql" />

<include file="databasechanges/?/procedures/ddl_sp_rollback_proc_3.sql" />

<include file="databasechanges/?/procedures/ddl_sp_rollback_proc_4.sql" />

<include file="databasechanges/?/procedures/ddl_sp_rollback_proc_7.sql" />

The ? is just a character string with the application name.

Thanks for any assistance anyone can offer.

<include file="changelogs/test-rollback-2/db-changelog-ddl_dhub_table_ddl.xml"/>

<include file="changelogs/test-rollback-2/db-changelog-ddl_dhub_table_dml.xml"/>

<include file="changelogs/test-rollback-2/db-changelog-ddl_dhub_procedure.xml"/>

<include file="changelogs/test-rollback-2/db-changelog-ddl_dhub_streams.xml"/>

<include file="changelogs/test-rollback-2/db-changelog-ddl_dhub_task.xml"/>

<include file="changelogs/test-rollback-2/db-changelog-ddl_dhub_view.xml"/>



<changeSet author="itw-datahub-test-rollback-2-start" id="itw-datahub-test-rollback-2-1.0.0-end">

    <tagDatabase tag="itw-datahub-test-rollback-2-1.0.0-end"/>

</changeSet>