Uploaded image for project: 'Liquibase Core'
  1. CORE-465

Problems with rollback on sqlFile changes

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Cannot Reproduce
    • Affects versions: 1.9.4
    • Fix versions: 2.0.0
    • Components: None
    • Sprint:

      Description

      reported in: http://liquibase.org/forum/index.php?topic=126.0

      I have found, firstly, the real culprit, a previous change that used SqlFile (it's hard to see which change gives an error sometimes). The situation is pretty much the same, but simpler, and I've tried some variations. Here's the original:

      Code:

      <?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="ruby" id="1" >
      <sqlFile stripComments="true" path="r5/OpenCity-createTables.sql"/>
      <sqlFile stripComments="true" path="r5/OpenCity-insertData.sql"/>
      <rollback>
      <sqlFile stripComments="true" path="r5/OpenCity-rollback.sql"/>
      </rollback>
      </changeSet>
      </databaseChangeLog>

      I've tried with two separate changesets, with one rollback file for each SQL file, and finally with just one file:

      Code:

      <?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="ruby" id="1" >
      <sqlFile stripComments="true" path="r5/OpenCity-createTables.sql"/>
      <rollback>
      <sqlFile stripComments="true" path="r5/OpenCity-rollback.sql"/>
      </rollback>
      </changeSet>
      </databaseChangeLog>

      Still get the same issue. Since we haven't started doing a lot of changes yet, it hasn't been much of a problem so far, but it will be.

        Attachments

          Activity

            People

            • Reporter:
              nvoxland Nathan Voxland
            • Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: