summaryrefslogtreecommitdiffstats
path: root/tests/lib/DB/testschema.xml
blob: a2b01d8259e45946764a1e0c9a1a892380897eda (plain)
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
<?xml version="1.0" encoding="utf-8" ?>
<database>

	<name>*dbname*</name>
	<create>true</create>
	<overwrite>false</overwrite>

	<charset>utf8</charset>

	<table>

		<name>*dbprefix*table</name>

		<declaration>
			<field>
				<name>id</name>
				<type>integer</type>
				<default>0</default>
				<notnull>true</notnull>
				<primary>true</primary>
				<length>4</length>
				<autoincrement>1</autoincrement>
			</field>
			<field>
				<name>integerfield</name>
				<type>integer</type>
				<default>0</default>
				<notnull>true</notnull>
				<length>4</length>
			</field>
			<field>
				<name>integerfield_default</name>
				<type>integer</type>
				<default>10</default>
				<notnull>true</notnull>
				<length>4</length>
			</field>
			<field>
				<name>textfield</name>
				<type>text</type>
				<default>foo</default>
				<notnull>true</notnull>
				<length>32</length>
			</field>
			<field>
				<name>clobfield</name>
				<type>text</type>
			</field>
			<field>
				<name>booleanfield</name>
				<type>boolean</type>
			</field>
			<field>
				<name>booleanfield_true</name>
				<type>boolean</type>
				<default>true</default>
			</field>
			<field>
				<name>booleanfield_false</name>
				<type>boolean</type>
				<default>false</default>
			</field>
			<field>
				<name>decimalfield_precision_scale</name>
				<type>decimal</type>
				<precision>12</precision>
				<scale>2</scale>
			</field>

			<index>
				<name>index_primary</name>
				<primary>true</primary>
				<unique>true</unique>
				<field>
					<name>id</name>
					<sorting>ascending</sorting>
				</field>
			</index>

			<index>
				<name>index_integerfield</name>
				<unique>true</unique>
				<field>
					<name>integerfield</name>
					<sorting>ascending</sorting>
				</field>
			</index>

			<index>
				<name>index_boolean</name>
				<unique>false</unique>
				<field>
					<name>booleanfield</name>
					<sorting>ascending</sorting>
				</field>
			</index>
		</declaration>
	</table>
</database>