-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.xml
90 lines (88 loc) · 5.21 KB
/
schema.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
<?xml version="1.0" encoding="utf-8"?>
<database name="productionSource" defaultIdMethode="native">
<table name="Gig" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="VenueId" type="integer"></column>
<column name="Title" required="true" type="varchar" size="255"></column>
<column name="Date" type="date"></column>
<column name="Entry" type="decimal" size="3" scale="2"></column>
<column name="Notes" type="varchar" size="1024"></column>
<column name="Fix" type="boolean" required="true" defaultValue="0"></column>
<foreign-key foreignTable="Venue" name="GigVenueId">
<reference local="VenueId" foreign="Id"/>
</foreign-key>
<behavior name="validate">
<parameter name="rule1" value="{column: title, validator: NotNull}" />
<parameter name="rule2" value="{column: title, validator: Length, options: {max: 128}}" />
<parameter name="rule3" value="{column: fix, validator: NotNull}" />
</behavior>
</table>
<table name="Order" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="Name" required="true" type="varchar" size="255"></column>
<column name="Street" type="varchar" size="255"></column>
<column name="City" type="varchar" size="255"></column>
<column name="Mail" type="varchar" size="255"></column>
<column name="Telephone" type="varchar" size="255"></column>
<column name="Notes" type="varchar" size="255"></column>
<column name="Paid" type="boolean" required="true" defaultValue="0"></column>
<column name="Shipped" type="boolean" required="true" defaultValue="0"></column>
</table>
<table name="Product" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="Title" required="true" type="varchar" size="255"></column>
<column name="Description" type="varchar" size="255"></column>
<column name="Price" type="decimal" size="3" scale="2" required="true"></column>
</table>
<table name="Orderposition" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="ProductId" required="true" type="integer"></column>
<column name="OrderId" required="true" type="integer"></column>
<column name="Number" type="integer" required="true"></column>
<foreign-key foreignTable="Product" name="OrderpositionProductId">
<reference local="ProductId" foreign="Id"/>
</foreign-key>
<foreign-key foreignTable="Order" name="OrderpositionOrderId">
<reference local="OrderId" foreign="Id"/>
</foreign-key>
</table>
<table name="Venue" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="Name" type="varchar" size="255" required="true"></column>
<column name="City" type="varchar" size="255" required="true"></column>
<column name="Link" type="varchar" size="255"></column>
<column name="Lat" type="decimal" size="8" scale="6"></column>
<column name="Lon" type="decimal" size="9" scale="6"></column>
<column name="Picture" type="varchar" size="255"></column>
<column name="Rating" type="integer" required="true"></column>
<column name="Size" type="integer"></column>
<column name="Plz" type="integer" required="true"></column>
<column name="Address" type="varchar" size="255"></column>
</table>
<table name="Contact" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="Name" type="varchar" size="255" required="true"></column>
<column name="Mail" type="varchar" size="255"></column>
<column name="Telephone" type="varchar" size="255"></column>
<column name="Notes" type="varchar" size="1024"></column>
<column name="VenueId" type="integer"></column>
<column name="GigId" type="integer"></column>
<foreign-key foreignTable="Venue" name="ContactVenueId">
<reference local="VenueId" foreign="Id"/>
</foreign-key>
<foreign-key foreignTable="Gig" name="ContactGigId">
<reference local="GigId" foreign="Id"/>
</foreign-key>
</table>
<table name="User" >
<column name="Id" type="integer" required="true" primaryKey="true" autoIncrement="true"></column>
<column name="Name" type="varchar" size="255" required="true"></column>
<column name="Username" type="varchar" size="255" required="true"></column>
<column name="Mail" type="varchar" size="255" required="true"></column>
<column name="Password" type="varchar" size="255" required="true"></column>
<column name="Salt" type="varchar" size="255" required="true"></column>
<column name="LastLogin" type="timestamp" required="true"></column>
<column name="Telephone" type="varchar" size="255"></column>
<column name="Picture" type="varchar" size="5012"></column>
</table>
</database>