Skip to content

Commit

Permalink
add ignore property to includeAll XSD (DAT-14921) (#5686)
Browse files Browse the repository at this point in the history
The ignore code has existed for a long time for includeAll, but it was not part of the XSD.
  • Loading branch information
StevenMassaro committed Mar 21, 2024
1 parent 14288cf commit 2060779
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
<?xml version="1.0" encoding="UTF-8"?>

<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://www.liquibase.org/xml/ns/dbchangelog http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-latest.xsd">

<changeSet id="1" author="nvoxland">
<createTable tableName="relpathinclude1">
<column name="id" type="int"/>
</createTable>
</changeSet>

<includeAll path="changelogs/common/includerelative/includeAll" ignore="true"/>
</databaseChangeLog>
Original file line number Diff line number Diff line change
Expand Up @@ -520,4 +520,35 @@ Total change sets: 0
]
expectedException = CommandExecutionException
}

run "Ignore on includeAll", {
arguments = [
url : { it.url },
username : { it.username },
password : { it.password },
changelogFile: "changelogs/common/includerelative/pathinclude1.ignored.changelog.xml",
showSummary: "VERBOSE"
]

expectedOutput = """
UPDATE SUMMARY
Run: 1
Previously run: 0
Filtered out: 1
-------------------------------
Total change sets: 2
FILTERED CHANGE SETS SUMMARY
Ignored: 1
+--------------------------------------------------------------+----------------------+
| Changeset Info | Reason Skipped |
+--------------------------------------------------------------+----------------------+
| | Changeset is ignored |
| changelogs/common/includerelative/includeAll/pathinclude2.ch | |
| angelog.xml::1::nvoxland | |
+--------------------------------------------------------------+----------------------+
"""
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -112,6 +112,7 @@
<xsd:attribute name="minDepth" type="integerExp"/>
<xsd:attribute name="maxDepth" type="integerExp"/>
<xsd:attribute name="endsWithFilter" type="xsd:string"/>
<xsd:attribute name="ignore" type="xsd:string"/>
<xsd:anyAttribute namespace="##other" processContents="lax"/>
</xsd:complexType>
</xsd:element>
Expand Down

0 comments on commit 2060779

Please sign in to comment.