line-breaks in customer address sanmple data + sample data separated
This commit is contained in:
		@@ -1,10 +1,8 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<databaseChangeLog
 | 
					<databaseChangeLog
 | 
				
			||||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
					    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"
 | 
					    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
 | 
					    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="now()" dbms="h2"/>
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -53,17 +51,5 @@
 | 
				
			|||||||
        </createTable>
 | 
					        </createTable>
 | 
				
			||||||
        
 | 
					        
 | 
				
			||||||
    </changeSet>
 | 
					    </changeSet>
 | 
				
			||||||
 | 
					 | 
				
			||||||
    <changeSet id="20190402141612-2" author="mhoennig" context="sample-data">
 | 
					 | 
				
			||||||
        <loadData encoding="UTF-8"
 | 
					 | 
				
			||||||
                  file="config/liquibase/sample-data/customers.csv"
 | 
					 | 
				
			||||||
                  separator=";"
 | 
					 | 
				
			||||||
                  tableName="customer">
 | 
					 | 
				
			||||||
            <column name="id" type="numeric"/>
 | 
					 | 
				
			||||||
            <column name="jhi_number" type="numeric"/>
 | 
					 | 
				
			||||||
            <column name="prefix" type="string"/>
 | 
					 | 
				
			||||||
        </loadData>
 | 
					 | 
				
			||||||
    </changeSet>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
					    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
				
			||||||
</databaseChangeLog>
 | 
					</databaseChangeLog>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,8 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<databaseChangeLog
 | 
					<databaseChangeLog
 | 
				
			||||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
					    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"
 | 
					    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
 | 
					    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="now()" dbms="h2"/>
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -38,17 +36,5 @@
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
    </changeSet>
 | 
					    </changeSet>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <changeSet id="20190403083736-2" author="mhoennig" context="sample-data">
 | 
					 | 
				
			||||||
        <loadData encoding="UTF-8"
 | 
					 | 
				
			||||||
                  file="config/liquibase/sample-data/contacts.csv"
 | 
					 | 
				
			||||||
                  separator=";"
 | 
					 | 
				
			||||||
                  tableName="contact">
 | 
					 | 
				
			||||||
            <column name="id" type="numeric"/>
 | 
					 | 
				
			||||||
            <column name="first_name" type="string"/>
 | 
					 | 
				
			||||||
            <column name="last_name" type="string"/>
 | 
					 | 
				
			||||||
            <column name="email" type="string"/>
 | 
					 | 
				
			||||||
        </loadData>
 | 
					 | 
				
			||||||
    </changeSet>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
					    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
				
			||||||
</databaseChangeLog>
 | 
					</databaseChangeLog>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,10 +1,8 @@
 | 
				
			|||||||
<?xml version="1.0" encoding="utf-8"?>
 | 
					<?xml version="1.0" encoding="utf-8"?>
 | 
				
			||||||
<databaseChangeLog
 | 
					<databaseChangeLog
 | 
				
			||||||
    xmlns="http://www.liquibase.org/xml/ns/dbchangelog"
 | 
					    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"
 | 
					    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
 | 
					    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="now()" dbms="h2"/>
 | 
				
			||||||
    
 | 
					    
 | 
				
			||||||
@@ -38,17 +36,5 @@
 | 
				
			|||||||
        
 | 
					        
 | 
				
			||||||
    </changeSet>
 | 
					    </changeSet>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    <changeSet id="20190403083737-2" author="mhoennig" context="sample-data">
 | 
					 | 
				
			||||||
        <loadData encoding="UTF-8"
 | 
					 | 
				
			||||||
                  file="config/liquibase/sample-data/customer-contacts.csv"
 | 
					 | 
				
			||||||
                  separator=";"
 | 
					 | 
				
			||||||
                  tableName="customer_contact">
 | 
					 | 
				
			||||||
            <column name="id" type="numeric"/>
 | 
					 | 
				
			||||||
            <column name="customer" type="numeric"/>
 | 
					 | 
				
			||||||
            <column name="role" type="string"/>
 | 
					 | 
				
			||||||
            <column name="contact" type="numeric"/>
 | 
					 | 
				
			||||||
        </loadData>
 | 
					 | 
				
			||||||
    </changeSet>
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
					    <!-- jhipster-needle-liquibase-add-changeset - JHipster will add changesets here, do not remove-->
 | 
				
			||||||
</databaseChangeLog>
 | 
					</databaseChangeLog>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					<?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-3.5.xsd">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <changeSet id="sample-data-Contact-01" author="mhoennig" context="sample-data">
 | 
				
			||||||
 | 
					        <loadData encoding="UTF-8"
 | 
				
			||||||
 | 
					                  file="config/liquibase/sample-data/contacts.csv"
 | 
				
			||||||
 | 
					                  separator=";"
 | 
				
			||||||
 | 
					                  tableName="contact">
 | 
				
			||||||
 | 
					            <column name="id" type="numeric"/>
 | 
				
			||||||
 | 
					            <column name="first_name" type="string"/>
 | 
				
			||||||
 | 
					            <column name="last_name" type="string"/>
 | 
				
			||||||
 | 
					            <column name="email" type="string"/>
 | 
				
			||||||
 | 
					        </loadData>
 | 
				
			||||||
 | 
					    </changeSet>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</databaseChangeLog>
 | 
				
			||||||
@@ -0,0 +1,32 @@
 | 
				
			|||||||
 | 
					<?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-3.5.xsd">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <changeSet id="sample-data-Customer-01" author="mhoennig" context="sample-data">
 | 
				
			||||||
 | 
					        <loadData encoding="UTF-8"
 | 
				
			||||||
 | 
					                  file="config/liquibase/sample-data/customers.csv"
 | 
				
			||||||
 | 
					                  separator=";"
 | 
				
			||||||
 | 
					                  quotchar="'"
 | 
				
			||||||
 | 
					                  tableName="customer">
 | 
				
			||||||
 | 
					            <column name="id" type="numeric"/>
 | 
				
			||||||
 | 
					            <column name="jhi_number" type="numeric"/>
 | 
				
			||||||
 | 
					            <column name="prefix" type="string"/>
 | 
				
			||||||
 | 
					            <column name="name" type="string"/>
 | 
				
			||||||
 | 
					            <column name="contractual_address" type="string"/>
 | 
				
			||||||
 | 
					        </loadData>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <!-- Liquibase CSV files can contain linebreaks just as real linebreaks, but which
 | 
				
			||||||
 | 
					             make the CSV files hard to read. Therefore I've encoded linebreaks as '|' and
 | 
				
			||||||
 | 
					             replace these after import with '\n'. -->
 | 
				
			||||||
 | 
					        <sql>
 | 
				
			||||||
 | 
					            UPDATE customer SET contractual_address = REPLACE(contractual_address, '|', STRINGDECODE('\n'));
 | 
				
			||||||
 | 
					        </sql>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					        <rollback>
 | 
				
			||||||
 | 
					            DELETE FROM customer;
 | 
				
			||||||
 | 
					        </rollback>
 | 
				
			||||||
 | 
					    </changeSet>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</databaseChangeLog>
 | 
				
			||||||
@@ -0,0 +1,19 @@
 | 
				
			|||||||
 | 
					<?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-3.5.xsd">
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <changeSet id="sample-data-CustomerContact-01" author="mhoennig" context="sample-data">
 | 
				
			||||||
 | 
					        <loadData encoding="UTF-8"
 | 
				
			||||||
 | 
					                  file="config/liquibase/sample-data/customer-contacts.csv"
 | 
				
			||||||
 | 
					                  separator=";"
 | 
				
			||||||
 | 
					                  tableName="customer_contact">
 | 
				
			||||||
 | 
					            <column name="id" type="numeric"/>
 | 
				
			||||||
 | 
					            <column name="customer" type="numeric"/>
 | 
				
			||||||
 | 
					            <column name="role" type="string"/>
 | 
				
			||||||
 | 
					            <column name="contact" type="numeric"/>
 | 
				
			||||||
 | 
					        </loadData>
 | 
				
			||||||
 | 
					    </changeSet>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					</databaseChangeLog>
 | 
				
			||||||
@@ -17,4 +17,9 @@
 | 
				
			|||||||
    <include file="config/liquibase/changelog/20190403083739_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
 | 
					    <include file="config/liquibase/changelog/20190403083739_added_entity_constraints_Share.xml" relativeToChangelogFile="false"/>
 | 
				
			||||||
    <include file="config/liquibase/changelog/20190403083740_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
 | 
					    <include file="config/liquibase/changelog/20190403083740_added_entity_constraints_Asset.xml" relativeToChangelogFile="false"/>
 | 
				
			||||||
    <!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
 | 
					    <!-- jhipster-needle-liquibase-add-constraints-changelog - JHipster will add liquibase constraints changelogs here -->
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
					    <include file="config/liquibase/changelog/sample-data-Customer.xml" relativeToChangelogFile="false"/>
 | 
				
			||||||
 | 
					    <include file="config/liquibase/changelog/sample-data-Contact.xml" relativeToChangelogFile="false"/>
 | 
				
			||||||
 | 
					    <include file="config/liquibase/changelog/sample-data-CustomerContact.xml" relativeToChangelogFile="false"/>
 | 
				
			||||||
 | 
					
 | 
				
			||||||
</databaseChangeLog>
 | 
					</databaseChangeLog>
 | 
				
			||||||
 
 | 
				
			|||||||
@@ -1,7 +1,7 @@
 | 
				
			|||||||
id;jhi_number;prefix
 | 
					id;jhi_number;prefix;name;contractual_address
 | 
				
			||||||
1;10001;aaa
 | 
					1;10001;aaa;AAA Corp.;'Ballustrade 13|91334 Erlangen'
 | 
				
			||||||
2;10002;bbb
 | 
					2;10002;bbb;BBB GmbH;'Irgendwo 0|11111 Berlin'
 | 
				
			||||||
3;10003;ccc
 | 
					3;10003;ccc;CCC AG;'Haus 15|26539 Baltrum'
 | 
				
			||||||
4;10004;ddd
 | 
					4;10004;ddd;DDD eG;'Industriestraße 98-102|n22999 Hamburg'
 | 
				
			||||||
5;10098;abc
 | 
					5;10098;abc;ABC OHG;'An der Weide 13|30123 Hannover'
 | 
				
			||||||
6;10099;bca
 | 
					6;10099;bca;Bert Cäsar Adelbert;'Egerstraße 53|44225 Dortmund'
 | 
				
			||||||
 
 | 
				
			|||||||
		
		
			
  | 
		Reference in New Issue
	
	Block a user