Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Newer
Older
100644 175 lines (155 sloc) 4.706 kb
b1202ef Update DTD for schema.xml
heltem authored
1 <!--
2 Propel XML database schema DTD
3 $Id: database.dtd,v 1.7 2005/03/30 11:38:18 hlellelid Exp $
4
5 This is based very closely on the schema DTD for Torque, but
6 some differences do exist.
7 -->
8
9 <!--
10
11 defaultPhpNamingMethod determines how a table or column name,
12 from the name attribute in the xml database file, is converted to a
13 PHP class or method name.
14
15 nochange - indicates not change is performed.
16 underscore - Underscores are removed, First letter is
17 capitalized, first letter after an underscore
18 is capitalized, the rest of the letters are
19 converted to lowercase.
20 phpname - same as underscore, but no letters are converted
21 to lowercase.
22 -->
23
b5939dd @fzaninotto [1.5] Fixed schema DTD does not validate schemas without behaviors (c…
fzaninotto authored
24 <!ELEMENT database (external-schema*, table+, behavior*)>
b1202ef Update DTD for schema.xml
heltem authored
25 <!ATTLIST database
26 name CDATA #IMPLIED
27 defaultIdMethod (native|none) "none"
28 package CDATA #IMPLIED
35daa2e @fzaninotto [1.6] Documented new schema attributes for SQL schema support (refs #…
fzaninotto authored
29 schema CDATA #IMPLIED
5dff422 @fzaninotto [1.5] Introducing Model Namespaces (PHP 5.3 only) (WIP) (refs #683)
fzaninotto authored
30 namespace CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
31 baseClass CDATA #IMPLIED
32 defaultPhpNamingMethod (nochange|underscore|phpname) "underscore"
33 heavyIndexing (true|false) "false"
68aeb69 @marcj Added quoting identifier in runtime. Removed uppercased field names.
marcj authored
34 identifierQuoting (true|false) "false"
a2b8212 @fzaninotto [1.5] Added a way to prefix all the table names of a database schema …
fzaninotto authored
35 tablePrefix CDATA #IMPLIED
76eed92 @fzaninotto [1.6] Gave ActriveRecord and PropelCollection objects the ability to …
fzaninotto authored
36 defaultStringFormat CDATA #IMPLIED
a14a40b @fzaninotto [1.6] Fixed errors in database schema DTD (closes #1295)
fzaninotto authored
37 xmlns:xsi CDATA #IMPLIED
38 xsi:noNamespaceSchemaLocation CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
39 >
40
41 <!ELEMENT external-schema EMPTY>
42 <!ATTLIST external-schema
43 filename CDATA #REQUIRED
44 >
45
46 <!--
47 note: the interface="true", requires that useManagers=true in the
48 properties file.
49 -->
137ff3f @willdurand Removed validation. Fixes #94
willdurand authored
50 <!ELEMENT table (column+,(foreign-key|index|unique|id-method-parameter|behavior|vendor)*)>
b1202ef Update DTD for schema.xml
heltem authored
51 <!ATTLIST table
52 name CDATA #REQUIRED
53 phpName CDATA #IMPLIED
54 idMethod (native|autoincrement|sequence|none|null) "null"
55 skipSql (true|false) "false"
56 readOnly (true|false) "false"
57 abstract (true|false) "false"
134d626 @fzaninotto [1.5] Slightly changed the many-to-many declaration syntax in the sch…
fzaninotto authored
58 isCrossRef (true|false) "false"
c6afd5f @sbarex Update database.dtd
sbarex authored
59 allowPkInsert (true|false) "false"
b1202ef Update DTD for schema.xml
heltem authored
60 package CDATA #IMPLIED
35daa2e @fzaninotto [1.6] Documented new schema attributes for SQL schema support (refs #…
fzaninotto authored
61 schema CDATA #IMPLIED
62 namespace CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
63 baseClass CDATA #IMPLIED
64 alias CDATA #IMPLIED
65 interface CDATA #IMPLIED
66 phpNamingMethod (nochange|underscore|phpname) #IMPLIED
67 heavyIndexing (true|false) #IMPLIED
68aeb69 @marcj Added quoting identifier in runtime. Removed uppercased field names.
marcj authored
68 identifierQuoting (true|false) #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
69 description CDATA #IMPLIED
76eed92 @fzaninotto [1.6] Gave ActriveRecord and PropelCollection objects the ability to …
fzaninotto authored
70 defaultStringFormat CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
71 >
72
73 <!ELEMENT id-method-parameter EMPTY>
74 <!ATTLIST id-method-parameter
75 name CDATA "default"
76 value CDATA #REQUIRED
77 >
78
79 <!ELEMENT column ((inheritance|vendor)*)>
80 <!ATTLIST column
81 name CDATA #REQUIRED
82 phpName CDATA #IMPLIED
a4e889e @marcj Removed all peer stuff.
marcj authored
83 tableMapName CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
84 primaryKey (true|false) "false"
85 required (true|false) "false"
86 type
87 (
f632d24 @fzaninotto [1.6] Added ARRAY column type (refs #135)
fzaninotto authored
88 BIT | TINYINT | SMALLINT | INTEGER | BIGINT | FLOAT
89 | REAL | NUMERIC | DECIMAL | CHAR | VARCHAR | LONGVARCHAR
90 | DATE | TIME | TIMESTAMP | BINARY | VARBINARY | LONGVARBINARY
91 | NULL | OTHER | PHP_OBJECT | DISTINCT | STRUCT | ARRAY
92 | BLOB | CLOB | REF | BOOLEANINT | BOOLEANCHAR
a14a40b @fzaninotto [1.6] Fixed errors in database schema DTD (closes #1295)
fzaninotto authored
93 | DOUBLE | BOOLEAN | OBJECT | ENUM
b1202ef Update DTD for schema.xml
heltem authored
94 ) "VARCHAR"
1a2c9e6 Committing mass of changes, related primarily to ticket:11 and ticket…
hans authored
95 phpType CDATA #IMPLIED
96 sqlType CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
97 size CDATA #IMPLIED
98 scale CDATA #IMPLIED
99 default CDATA #IMPLIED
1a2c9e6 Committing mass of changes, related primarily to ticket:11 and ticket…
hans authored
100 defaultValue CDATA #IMPLIED
101 defaultExpr CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
102 autoIncrement (true|false) "false"
103 inheritance (single|false) "false"
104 phpNamingMethod (nochange|underscore|phpname) #IMPLIED
105 description CDATA #IMPLIED
ab7d993 @marcj Added "typeHint" to column element and "interface" to foreign-key ele…
marcj authored
106 typeHint CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
107 lazyLoad (true|false) "false"
39594f6 @fzaninotto [1.4] Added a `primaryString` column attribute to allow smart `__toSt…
fzaninotto authored
108 primaryString (true|false) "false"
5d24ca6 @fzaninotto [1.6] Added ENUM column type and modified ActiveRecord builder to han…
fzaninotto authored
109 valueSet CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
110 >
111
112 <!ELEMENT inheritance EMPTY>
113 <!ATTLIST inheritance
114 key CDATA #REQUIRED
115 class CDATA #REQUIRED
116 package CDATA #IMPLIED
117 extends CDATA #IMPLIED
118 >
119
120 <!ELEMENT foreign-key (reference+, vendor*)>
121 <!ATTLIST foreign-key
122 foreignTable CDATA #REQUIRED
35daa2e @fzaninotto [1.6] Documented new schema attributes for SQL schema support (refs #…
fzaninotto authored
123 foreignSchema CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
124 name CDATA #IMPLIED
125 phpName CDATA #IMPLIED
126 refPhpName CDATA #IMPLIED
ab7d993 @marcj Added "typeHint" to column element and "interface" to foreign-key ele…
marcj authored
127 interface CDATA #IMPLIED
b1202ef Update DTD for schema.xml
heltem authored
128 onUpdate (CASCADE|cascade|SETNULL|setnull|RESTRICT|restrict|NONE|none) "none"
129 onDelete (CASCADE|cascade|SETNULL|setnull|RESTRICT|restrict|NONE|none) "none"
72ab1e8 @fzaninotto [1.6] Introducing virtual foreign keys (refs #1249)
fzaninotto authored
130 skipSql (true|false) "false"
b1202ef Update DTD for schema.xml
heltem authored
131 >
132
133 <!ELEMENT reference EMPTY>
134 <!ATTLIST reference
135 local CDATA #REQUIRED
136 foreign CDATA #REQUIRED
137 >
138
30b50f5 @sbarex Update database.dtd
sbarex authored
139 <!ELEMENT index (index-column+,vendor*)>
b1202ef Update DTD for schema.xml
heltem authored
140 <!ATTLIST index
141 name CDATA #IMPLIED
142 >
143
c6afd5f @sbarex Update database.dtd
sbarex authored
144 <!ELEMENT behavior (parameter*)>
a95de16 @fzaninotto [1.5][1.6] Fixed typo in schema DTD (patch by omeaart) (closes #1194)
fzaninotto authored
145 <!ATTLIST behavior
3bd6787 @fzaninotto [1.4] Added support for build-time behaviors in the XML schema (refs …
fzaninotto authored
146 name CDATA #IMPLIED
147 >
148
b1202ef Update DTD for schema.xml
heltem authored
149 <!ELEMENT index-column (vendor*)>
150 <!ATTLIST index-column
151 name CDATA #REQUIRED
152 size CDATA #IMPLIED
153 >
154
155 <!ELEMENT unique (unique-column+)>
156 <!ATTLIST unique
157 name CDATA #IMPLIED
158 >
159
160 <!ELEMENT unique-column (vendor*)>
161 <!ATTLIST unique-column
162 name CDATA #REQUIRED
163 >
164
165 <!ELEMENT vendor (parameter+)>
5984645 allowing custom validator config in schema.xml without xml validation…
oliver authored
166 <!ATTLIST vendor
b1202ef Update DTD for schema.xml
heltem authored
167 type CDATA #REQUIRED
168 >
169
170 <!ELEMENT parameter EMPTY>
171 <!ATTLIST parameter
172 name CDATA #REQUIRED
173 value CDATA #REQUIRED
174 >
Something went wrong with that request. Please try again.