membership sample data and some minor fixes
This commit is contained in:
parent
89437ca067
commit
7f358cc7fe
@ -10,11 +10,6 @@
|
||||
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
|
||||
|
@ -9,11 +9,18 @@
|
||||
file="config/liquibase/sample-data/memberships.csv"
|
||||
separator=";"
|
||||
tableName="membership">
|
||||
<column name="id" type="numeric"/>
|
||||
<column name="customer" type="numeric"/>
|
||||
<column name="jhi_from" type="date"/>
|
||||
<column name="jhi_to" type="date"/>
|
||||
</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 membership SET remark = REPLACE(remark, '|', STRINGDECODE('\n'));
|
||||
</sql>
|
||||
|
||||
<rollback>
|
||||
DELETE FROM membership;
|
||||
</rollback>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
@ -21,5 +21,6 @@
|
||||
|
||||
<!-- sample data -->
|
||||
<include file="config/liquibase/sample-data/customers.xml" relativeToChangelogFile="false"/>
|
||||
<include file="config/liquibase/sample-data/memberships.xml" relativeToChangelogFile="false"/>
|
||||
|
||||
</databaseChangeLog>
|
||||
|
@ -1,6 +1,7 @@
|
||||
id;customer_id;jhi_from;jhi_to
|
||||
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
|
||||
id;customer_id;admission_document_date;cancellation_document_date;member_from_date;member_until_date;remark
|
||||
1;1;2001-04-10;2007-08-09;2001-04-11;2007-12-31;is now client of another member|see XYZ
|
||||
2;1;2017-01-15;null;2017-01-15;null;nothing to say here
|
||||
3;3;2003-05-11;2019-11-30;2003-05-15;2019-12-31;business discontinued
|
||||
4;4;2017-05-15;null;2017-05-15;null;whatever|is|to|say
|
||||
5;5;2011-08-18;null;2011-08-18;null;foo bar etc.
|
||||
|
||||
|
|
@ -0,0 +1,25 @@
|
||||
<?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="20190502100700-1" author="mhoennig" context="sample-data">
|
||||
<loadData encoding="UTF-8"
|
||||
file="config/liquibase/sample-data/memberships.csv"
|
||||
separator=";"
|
||||
tableName="membership">
|
||||
</loadData>
|
||||
</changeSet>
|
||||
|
||||
<changeSet id="20190502100700-2" author="mhoennig" context="sample-data">
|
||||
<sql>UPDATE membership SET remark = replace(remark, '|', '\n')</sql>
|
||||
</changeSet>
|
||||
|
||||
</databaseChangeLog>
|
@ -27,7 +27,7 @@
|
||||
<tr *ngFor="let membership of memberships ;trackBy: trackId">
|
||||
<td><a [routerLink]="['/membership', membership.id, 'view' ]">{{membership.id}}</a></td>
|
||||
<td>{{membership.admissionDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.cancellationDocumentDate | date:'mediumDsate'}}</td>
|
||||
<td>{{membership.cancellationDocumentDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberFromDate | date:'mediumDate'}}</td>
|
||||
<td>{{membership.memberUntilDate | date:'mediumDate'}}</td>
|
||||
<td>
|
||||
|
Loading…
Reference in New Issue
Block a user