-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathdb_plan.xml
More file actions
126 lines (126 loc) · 3.75 KB
/
Copy pathdb_plan.xml
File metadata and controls
126 lines (126 loc) · 3.75 KB
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
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
<?xml version="1.0" encoding="utf-8" ?>
<!-- SQL XML created by WWW SQL Designer, https://github.com/ondras/wwwsqldesigner/ -->
<!-- Active URL: https://ondras.zarovi.cz/sql/demo/ -->
<sql>
<datatypes db="sqlite">
<group label="Affinity">
<type label="Text" default="" length="1" sql="TEXT" quote="'" color="rgb(255,200,200)"/>
<type label="Numeric" default="0" length="0" sql="NUMERIC" quote="" color="rgb(238,238,170)"/>
<type label="Integer" default="0" length="0" sql="INTEGER" quote="" color="rgb(238,238,170)"/>
<type label="Real" default="0" length="0" sql="REAL" quote="" color="rgb(238,238,170)"/>
<type label="None" default="" length="0" sql="NONE" quote="" color="rgb(200,255,200)"/>
</group>
</datatypes><table x="100" y="50" name="User">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
</row>
<row name="username" null="0" autoincrement="0">
<datatype>TEXT(64)</datatype>
</row>
<row name="email" null="0" autoincrement="0">
<datatype>TEXT(120)</datatype>
</row>
<row name="password_hash" null="0" autoincrement="0">
<datatype>TEXT(128)</datatype>
</row>
<row name="active" null="0" autoincrement="0">
<datatype>NUMERIC</datatype>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="400" y="50" name="Car">
<row name="id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
</row>
<row name="trip" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
</row>
<row name="start_trip" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
</row>
<row name="buy_price" null="0" autoincrement="0">
<datatype>REAL</datatype>
</row>
<row name="buy_time" null="0" autoincrement="0">
<datatype>TEXT</datatype>
</row>
<row name="sale_time" null="1" autoincrement="0">
<datatype>TEXT</datatype>
<default>NULL</default></row>
<row name="car_model_id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<relation table="CarModel" row="id" />
</row>
<row name="user_id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<relation table="User" row="id" />
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="700" y="52" name="CarModel">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
</row>
<row name="manufacturer" null="0" autoincrement="0">
<datatype>TEXT(120)</datatype>
</row>
<row name="model" null="0" autoincrement="0">
<datatype>TEXT(120)</datatype>
</row>
<row name="fuel_type" null="0" autoincrement="0">
<datatype>TEXT(20)</datatype>
</row>
<row name="engine_volume" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
</row>
<row name="engine_power" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="700" y="301" name="CarSpend">
<row name="id" null="1" autoincrement="1">
<datatype>INTEGER</datatype>
<default>NULL</default></row>
<row name="timestamp" null="0" autoincrement="0">
<datatype>TEXT</datatype>
</row>
<row name="trip" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
</row>
<row name="price" null="0" autoincrement="0">
<datatype>REAL</datatype>
</row>
<row name="amount" null="0" autoincrement="0">
<datatype>REAL</datatype>
</row>
<row name="car_id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<relation table="Car" row="id" />
</row>
<row name="car_spend_type_id" null="0" autoincrement="0">
<datatype>INTEGER</datatype>
<relation table="CarSpendType" row="id" />
</row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
<table x="900" y="301" name="CarSpendType">
<row name="id" null="0" autoincrement="1">
<datatype>INTEGER</datatype>
</row>
<row name="type" null="0" autoincrement="0">
<datatype>TEXT(140)</datatype>
<default>'NULL'</default></row>
<key type="PRIMARY" name="">
<part>id</part>
</key>
</table>
</sql>