1
0
Files
hs.hsadmin.ng/src/main/resources/config/liquibase/sample-data/assets.xml
Michael Hoennig f8ed5069fb sample-data: replacing pipes ('|') with newlines now via customChange
this avoids database-specific code spread over all sample-data/*.xml files
2019-05-05 14:15:07 +02:00

32 lines
1.4 KiB
XML

<?xml version="1.0" encoding="utf-8"?>
<databaseChangeLog
xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
xmlns:ext="http://www.liquibase.org/xml/ns/dbchangelog-ext"
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-3.5.xsd
http://www.liquibase.org/xml/ns/dbchangelog-ext http://www.liquibase.org/xml/ns/dbchangelog/dbchangelog-ext.xsd">
<property name="now" value="now()" dbms="h2"/>
<property name="now" value="current_timestamp" dbms="postgresql"/>
<property name="floatType" value="float4" dbms="postgresql, h2"/>
<property name="floatType" value="float" dbms="mysql, oracle, mssql"/>
<changeSet id="20190502111400-1" author="mhoennig" context="sample-data">
<loadData encoding="UTF-8"
file="config/liquibase/sample-data/assets.csv"
separator=";"
tableName="asset">
</loadData>
<customChange class="org.hostsharing.hsadminng.liquibase.ReplaceCustomChange">
<param name="tableName" value="asset" />
<param name="columnNames" value="remark" />
<param name="searchFor" value="|" />
<param name="replaceWith" value="\n" />
</customChange>
<rollback>
DELETE FROM asset;
</rollback>
</changeSet>
</databaseChangeLog>