sample data for contact and customer-contact

This commit is contained in:
Michael Hoennig 2019-04-03 13:40:13 +02:00
parent 301f5facd4
commit d379043a4b
6 changed files with 41 additions and 1 deletions

View File

@ -14,7 +14,6 @@ entity Contact {
email String required maxlength(80)
}
enum CustomerContactRole {
CONTRACTUAL,
TECHNICAL,

View File

@ -1,4 +1,5 @@
#H2 Server Properties
#Wed Apr 03 13:36:25 CEST 2019
0=JHipster H2 (Memory)|org.h2.Driver|jdbc\:h2\:mem\:hsadminng|hsadminNg
webAllowOthers=true
webPort=8082

View File

@ -37,5 +37,18 @@
</createTable>
</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-->
</databaseChangeLog>

View File

@ -37,5 +37,18 @@
</createTable>
</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-->
</databaseChangeLog>

View File

@ -0,0 +1,6 @@
id;first_name;last_name;email
1;Paule;Müller;paule.mueller@example.com
2;Helma;Schmidt;helma.schmidt@example.com
3;Vidi;Vitt;vidi.vitt@example.com
4;Saskia;Balder;saskia@balder.example.com
1 id first_name last_name email
2 1 Paule Müller paule.mueller@example.com
3 2 Helma Schmidt helma.schmidt@example.com
4 3 Vidi Vitt vidi.vitt@example.com
5 4 Saskia Balder saskia@balder.example.com

View File

@ -0,0 +1,8 @@
id;customer_id;jhi_role;contact_id
1;1;CONTRACTUAL;1
2;1;TECHNICAL;1
3;1;FINANCIAL;1
4;2;CONTRACTUAL;1
5;2;TECHNICAL;2
6;2;FINANCIAL;3
1 id customer_id jhi_role contact_id
2 1 1 CONTRACTUAL 1
3 2 1 TECHNICAL 1
4 3 1 FINANCIAL 1
5 4 2 CONTRACTUAL 1
6 5 2 TECHNICAL 2
7 6 2 FINANCIAL 3