added sample data for memberships

This commit is contained in:
Michael Hoennig 2019-04-12 18:50:38 +02:00
parent 3e66a21805
commit 7b7598871b
3 changed files with 27 additions and 0 deletions

View File

@ -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-Membership-01" author="mhoennig" context="sample-data">
<loadData encoding="UTF-8"
file="config/liquibase/sample-data/memberships.csv"
separator=";"
tableName="membership">
<column name="id" type="numeric"/>
<column name="customer" type="numeric"/>
<column name="since_date" type="date"/>
<column name="until_date" type="date"/>
</loadData>
</changeSet>
</databaseChangeLog>

View File

@ -21,5 +21,6 @@
<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"/>
<include file="config/liquibase/changelog/sample-data-Membership.xml" relativeToChangelogFile="false"/>
</databaseChangeLog>

View File

@ -0,0 +1,7 @@
id;customer_id;since_date;until_date
1;1;2001-04-10;2007-12-31
2;1;2017-01-15;null
3;3;2003-05-15;2019-12-31
4;4;2017-05-15;null
5;5;2011-08-18;null
1 id customer_id since_date until_date
2 1 1 2001-04-10 2007-12-31
3 2 1 2017-01-15 null
4 3 3 2003-05-15 2019-12-31
5 4 4 2017-05-15 null
6 5 5 2011-08-18 null