Commit | Line | Data |
dc34f950 |
1 | <?xml version="1.0" encoding="utf-8"?> |
2 | <!-- |
3 | Created by SQL::Translator::Producer::SqlfXML |
4 | Created on Fri Aug 15 15:08:18 2003 |
5 | |
6 | --> |
7 | <schema xmlns="http://sqlfairy.sourceforge.net/sqlfairy.xml"> |
8 | |
9 | <tables> |
10 | <table order="1" name="Basic"> |
11 | <fields> |
12 | <field |
13 | name="id" |
14 | is_primary_key="1" is_foreign_key="0" |
15 | size="10" data_type="int" is_auto_increment="1" order="1" |
16 | is_nullable="0"> |
17 | <extra ZEROFILL="1" /> |
18 | </field> |
19 | <field |
20 | name="title" |
21 | is_primary_key="0" is_foreign_key="0" |
22 | size="100" is_auto_increment="0" data_type="varchar" |
23 | order="2" default_value="hello" is_nullable="0" /> |
24 | <field |
25 | name="description" |
26 | size="0" data_type="text" order="3" default_value="" /> |
27 | <field name="email" size="500" data_type="varchar" order="4"> |
28 | <extra foo="bar" hello="world" bar="baz" /> |
29 | </field> |
30 | <field name="explicitnulldef" size="0" data_type="varchar" order="5" /> |
31 | <field name="explicitemptystring" size="0" |
32 | data_type="varchar" order="6" default_value="" /> |
33 | <field name="emptytagdef" size="0" |
9055d33a |
34 | data_type="varchar" order="7" default_value="backslash \ single-quote '" > |
0b45ad26 |
35 | <comments>Hello 'emptytagdef'</comments> |
dc34f950 |
36 | </field> |
37 | <field name="another_id" size="10" |
38 | data_type="int" default_value="2" /> |
39 | <field name="timest" size="0" |
40 | data_type="timestamp" order="7" > |
41 | </field> |
0a0aab7b |
42 | <field name="numeric" size="9,1" |
6dd07624 |
43 | data_type="numeric" order="8" default_value="42.69" > |
0a0aab7b |
44 | </field> |
45 | <field name="decimal" size="10,2" |
46 | data_type="decimal" order="9" > |
47 | </field> |
dc34f950 |
48 | </fields> |
49 | |
50 | <indices> |
51 | <index name="titleindex" fields="title" type="NORMAL"> |
52 | <extra foo="bar" hello="world" bar="baz" /> |
53 | </index> |
54 | </indices> |
55 | |
56 | <constraints> |
57 | <constraint name="" type="PRIMARY KEY" fields="id" |
58 | reference_table="" options="" deferrable="1" match_type="" |
59 | expression="" on_update="" on_delete=""> |
60 | <extra foo="bar" hello="world" bar="baz" /> |
61 | </constraint> |
62 | <constraint name="emailuniqueindex" type="UNIQUE" fields="email" /> |
abad172a |
63 | <constraint name="Basic" type="FOREIGN KEY" fields="another_id" |
dc34f950 |
64 | reference_table="Another" options="" deferrable="1" match_type="" |
65 | expression="" on_update="" on_delete=""> |
66 | </constraint> |
67 | </constraints> |
68 | |
69 | <extra foo="bar" hello="world" bar="baz" mysql_table_type="InnoDB" /> |
70 | </table> |
71 | |
72 | <table order="1" name="Another"> |
73 | <fields> |
74 | <field |
75 | name="id" |
76 | is_primary_key="1" is_foreign_key="0" |
77 | size="10" data_type="int" is_auto_increment="1" order="1" |
78 | is_nullable="0"> |
79 | </field> |
80 | </fields> |
81 | |
82 | <constraints> |
83 | <constraint name="" type="PRIMARY KEY" fields="id" |
84 | reference_table="" options="" deferrable="1" match_type="" |
85 | expression="" on_update="" on_delete=""> |
86 | </constraint> |
87 | </constraints> |
88 | |
89 | <extra foo="bar" hello="world" bar="baz" mysql_table_type="InnoDB" /> |
90 | </table> |
4d6f8a80 |
91 | |
92 | <table order="1" name="`table` [with] "quotes""> |
93 | <fields> |
94 | <field |
95 | name="`field` [with] "quotes"" |
96 | is_primary_key="1" is_foreign_key="0" |
97 | size="10" data_type="int" is_auto_increment="1" order="1" |
98 | is_nullable="0"> |
99 | </field> |
100 | </fields> |
101 | </table> |
fd498bb0 |
102 | |
103 | <table order="1" name=" table with spaces "> |
104 | <fields> |
105 | <field |
106 | name=" field with spaces " |
107 | is_primary_key="1" data_type="text" |
108 | default_value=" value with spaces "> |
109 | </field> |
110 | </fields> |
111 | </table> |
dc34f950 |
112 | </tables> |
113 | |
114 | <views> |
115 | <view name="email_list" fields="email" order="1"> |
116 | <sql>SELECT email FROM Basic WHERE (email IS NOT NULL)</sql> |
117 | <extra foo="bar" hello="world" bar="baz" /> |
118 | </view> |
119 | </views> |
120 | |
121 | <triggers> |
122 | <trigger name="foo_trigger" database_event="insert" on_table="Basic" |
123 | perform_action_when="after" order="1"> |
124 | <action>update modified=timestamp();</action> |
125 | <extra foo="bar" hello="world" bar="baz" /> |
126 | </trigger> |
127 | <trigger name="bar_trigger" database_events="insert , update" on_table="Basic" |
128 | perform_action_when="before" order="1"> |
129 | <action>update modified2=timestamp();</action> |
130 | <extra hello="aliens" /> |
131 | </trigger> |
c9c8f3e1 |
132 | <trigger name="`trigger` [with] "quotes"" |
133 | database_events="insert" |
134 | on_table="`table` [with] "quotes"" |
135 | perform_action_when="before" order="1"> |
136 | <action>select timestamp();</action> |
137 | </trigger> |
dc34f950 |
138 | </triggers> |
139 | |
140 | <procedures> |
141 | <procedure name="foo_proc" order="1" owner="Nomar" parameters="foo,bar"> |
142 | <sql>select foo from bar</sql> |
143 | <comments>Go Sox!</comments> |
144 | <extra foo="bar" hello="world" bar="baz" /> |
145 | </procedure> |
146 | </procedures> |
147 | |
148 | </schema> |