source: branches/1.5/generator/resources/xsd/database.xsd @ 1781

Revision 1781, 33.7 KB checked in by francois, 3 months ago (diff)

[1.5] Introducing Model Namespaces (PHP 5.3 only) (WIP) (refs #683)

  • Property svn:executable set to *
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema">
3        <!-- XML Schema for the Propel schema file
4      An additional xml schema: custom_datatypes.xsd is
5                  also included.  -->
6
7        <xs:include schemaLocation="custom_datatypes.xsd"/>
8
9        <xs:element name="database" type="database"/>
10
11        <xs:element name="vendor" type="vendor"/>
12
13        <xs:simpleType name="file">
14                <xs:restriction base="xs:string">
15                        <!-- Match any relative or absolute path and file containing letters, numbers and _ -->
16                        <xs:pattern value="((\.{1,2}|[\w_]*)/)*([\w_]*\.?)+"/>
17                </xs:restriction>
18        </xs:simpleType>
19
20        <xs:simpleType name="default_datatypes">
21                <xs:restriction base="xs:string">
22                        <xs:enumeration value="BIT"/>
23                        <xs:enumeration value="TINYINT"/>
24                        <xs:enumeration value="SMALLINT"/>
25                        <xs:enumeration value="INTEGER"/>
26                        <xs:enumeration value="BIGINT"/>
27                        <xs:enumeration value="FLOAT"/>
28                        <xs:enumeration value="REAL"/>
29                        <xs:enumeration value="NUMERIC"/>
30                        <xs:enumeration value="DECIMAL"/>
31                        <xs:enumeration value="CHAR"/>
32                        <xs:enumeration value="VARCHAR"/>
33                        <xs:enumeration value="LONGVARCHAR"/>
34                        <xs:enumeration value="DATE"/>
35                        <xs:enumeration value="TIME"/>
36                        <xs:enumeration value="TIMESTAMP"/>
37                        <xs:enumeration value="BINARY"/>
38                        <xs:enumeration value="VARBINARY"/>
39                        <xs:enumeration value="LONGVARBINARY"/>
40                        <xs:enumeration value="NULL"/>
41                        <xs:enumeration value="OTHER"/>
42                        <xs:enumeration value="PHP_OBJECT"/>
43                        <xs:enumeration value="DISTINCT"/>
44                        <xs:enumeration value="STRUCT"/>
45                        <xs:enumeration value="ARRAY"/>
46                        <xs:enumeration value="BLOB"/>
47                        <xs:enumeration value="CLOB"/>
48                        <xs:enumeration value="REF"/>
49                        <xs:enumeration value="BOOLEANINT"/>
50                        <xs:enumeration value="BOOLEANCHAR"/>
51                        <xs:enumeration value="DOUBLE"/>
52                        <xs:enumeration value="BOOLEAN"/>
53                </xs:restriction>
54        </xs:simpleType>
55
56        <xs:simpleType name="datatype">
57                <xs:union memberTypes="default_datatypes custom_datatypes"/>
58        </xs:simpleType>
59
60        <xs:simpleType name="dbidmethod">
61                <xs:restriction base="xs:string">
62                        <xs:enumeration value="native"/>
63                        <xs:enumeration value="none"/>
64                </xs:restriction>
65        </xs:simpleType>
66
67        <xs:simpleType name="tbidmethod">
68                <xs:restriction base="xs:string">
69                        <xs:enumeration value="autoincrement"/>
70                        <xs:enumeration value="sequence"/>
71                        <xs:enumeration value="null"/>
72                </xs:restriction>
73        </xs:simpleType>
74
75        <xs:simpleType name="idmethod">
76                <xs:union memberTypes="dbidmethod tbidmethod"/>
77        </xs:simpleType>
78
79        <xs:simpleType name="phpnamingmethod">
80                <xs:restriction base="xs:string">
81                        <xs:enumeration value="nochange"/>
82                        <xs:enumeration value="underscore"/>
83                        <xs:enumeration value="phpname"/>
84                </xs:restriction>
85        </xs:simpleType>
86
87        <xs:simpleType name="delete">
88                <xs:restriction base="xs:string">
89                        <xs:enumeration value="cascade"/>
90                        <xs:enumeration value="CASCADE"/>
91                        <xs:enumeration value="set null"/>
92                        <xs:enumeration value="SET NULL"/>
93                        <xs:enumeration value="setnull"/>
94                        <xs:enumeration value="SETNULL"/>
95                        <xs:enumeration value="restrict"/>
96                        <xs:enumeration value="RESTRICT"/>
97                        <xs:enumeration value="none"/>
98                        <xs:enumeration value="NONE"/>
99                        <xs:enumeration value=""/>
100                </xs:restriction>
101        </xs:simpleType>
102
103        <xs:simpleType name="update">
104                <xs:restriction base="xs:string">
105                        <xs:enumeration value="cascade"/>
106                        <xs:enumeration value="CASCADE"/>
107                        <xs:enumeration value="set null"/>
108                        <xs:enumeration value="SET NULL"/>
109                        <xs:enumeration value="setnull"/>
110                        <xs:enumeration value="SETNULL"/>
111                        <xs:enumeration value="restrict"/>
112                        <xs:enumeration value="RESTRICT"/>
113                        <xs:enumeration value="none"/>
114                        <xs:enumeration value="NONE"/>
115                        <xs:enumeration value=""/>
116                </xs:restriction>
117        </xs:simpleType>
118
119        <xs:simpleType name="rulename">
120                <xs:restriction base="xs:string">
121                        <xs:enumeration value="match"/>
122                        <xs:enumeration value="maxLength"/>
123                        <xs:enumeration value="maxValue"/>
124                        <xs:enumeration value="minLength"/>
125                        <xs:enumeration value="minValue"/>
126                        <xs:enumeration value="notMatch"/>
127                        <xs:enumeration value="required"/>
128                        <xs:enumeration value="type"/>
129                        <xs:enumeration value="unique"/>
130                        <xs:enumeration value="validValues"/>
131                        <!-- the next validators don't seem to be implemented, keeping them for BC -->
132                        <xs:enumeration value="mask"/>
133                        <xs:enumeration value="class"/>
134                </xs:restriction>
135        </xs:simpleType>
136
137        <xs:simpleType name="inh_option">
138                <xs:restriction base="xs:string">
139                        <xs:enumeration value="single"/>
140                        <xs:enumeration value="false"/>
141                </xs:restriction>
142        </xs:simpleType>
143       
144        <xs:simpleType name="sql_type">
145                <xs:restriction base="xs:string">
146                        <xs:pattern value="[\w\s\[\]\(\),\.']+"/>
147                </xs:restriction>
148        </xs:simpleType>
149       
150        <xs:simpleType name="php_type">
151                <xs:restriction base="xs:string">
152                        <xs:pattern value="[\w_]+"/>
153                </xs:restriction>
154        </xs:simpleType>
155
156        <xs:simpleType name="treemode">
157                <xs:restriction base="xs:string">
158                        <xs:enumeration value="AdjacencyList"/>
159                        <xs:enumeration value="MaterializedPath"/>
160                        <xs:enumeration value="NestedSet"/>
161                </xs:restriction>
162        </xs:simpleType>
163
164        <!-- Visibility for column accessor and mutator methods -->
165        <xs:simpleType name="visibility">
166                <xs:restriction base="xs:string">
167                        <xs:enumeration value="public"/>
168                        <xs:enumeration value="protected"/>
169                        <xs:enumeration value="private"/>
170                </xs:restriction>
171        </xs:simpleType>
172
173        <!-- Restrict column name to letters (upper- and lowercase), numbers and the _ -->
174        <xs:simpleType name="column_name">
175                <xs:restriction base="xs:string">
176                        <xs:pattern value="[\w_]+"/>
177                </xs:restriction>
178        </xs:simpleType>
179
180        <!-- Restrict php name to letters (upper- and lowercase), numbers and the _ -->
181        <xs:simpleType name="php_name">
182                <xs:restriction base="xs:string">
183                        <xs:pattern value="[\w_]+"/>
184                </xs:restriction>
185        </xs:simpleType>
186
187        <!-- Restrict php class name to letters (upper- and lowercase), numbers and the _. Dot seperated -->
188        <xs:simpleType name="php_class">
189                <xs:restriction base="xs:string">
190                        <xs:pattern value="([\w_]+.?)+"/>
191                </xs:restriction>
192        </xs:simpleType>
193
194        <!-- Restrict php namespaces name to letters (upper- and lowercase), numbers and the backslash Dot seperated -->
195        <xs:simpleType name="php_namespace">
196                <xs:restriction base="xs:string">
197                        <xs:pattern value="(\\?[\w_]+)+"/>
198                </xs:restriction>
199        </xs:simpleType>
200
201        <!-- Restrict table name to letters (upper- and lowercase), numbers and the _ -->
202        <xs:simpleType name="table_name">
203                <xs:restriction base="xs:string">
204                        <xs:pattern value="[\w_]+"/>
205                </xs:restriction>
206        </xs:simpleType>
207
208        <!-- Restrict index name to letters (upper- and lowercase), numbers and the _ -->
209        <xs:simpleType name="index_name">
210                <xs:restriction base="xs:string">
211                        <xs:pattern value="[\w_]+"/>
212                </xs:restriction>
213        </xs:simpleType>
214
215        <!-- Restrict foreign column name to letters (upper- and lowercase), numbers and the _ -->
216        <xs:simpleType name="foreign_name">
217                <xs:restriction base="xs:string">
218                        <xs:pattern value="[\w_]+"/>
219                </xs:restriction>
220        </xs:simpleType>
221
222        <xs:complexType name="parameter">
223                <xs:attribute name="name" type="xs:string" use="required"/>
224                <xs:attribute name="value" type="xs:string" use="required"/>
225        </xs:complexType>
226
227        <xs:complexType name="validator">
228                <xs:sequence>
229                        <xs:element name="rule" type="rule" maxOccurs="unbounded"/>
230                </xs:sequence>
231                <xs:attribute name="column" type="column_name" use="required"/>
232                <xs:attribute name="translate" type="xs:string" use="optional"/>
233        </xs:complexType>
234
235        <xs:complexType name="vendor">
236                <xs:sequence>
237                        <xs:element name="parameter" type="parameter" maxOccurs="unbounded"/>
238                </xs:sequence>
239                <xs:attribute name="type" use="required"/>
240        </xs:complexType>
241
242        <xs:complexType name="rule">
243                <xs:attribute name="name" type="rulename" use="required"/>
244                <xs:attribute name="value" type="xs:string" use="optional"/>
245                <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
246                <xs:attribute name="message" type="xs:string" use="optional"/>
247                <xs:attribute name="class" type="xs:string" use="optional"/>
248        </xs:complexType>
249
250        <xs:complexType name="id-method-parameter">
251                <xs:attribute name="name" type="xs:string" use="optional"/>
252                <xs:attribute name="value" type="xs:string" use="required"/>
253        </xs:complexType>
254
255        <xs:complexType name="index">
256                <xs:choice maxOccurs="unbounded">
257                        <xs:element name="index-column" type="index-column" minOccurs="1" maxOccurs="unbounded"/>
258                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
259                </xs:choice>
260                <xs:attribute name="name" type="index_name" use="optional"/>
261        </xs:complexType>
262
263        <xs:complexType name="unique">
264                <xs:choice maxOccurs="unbounded">
265                        <xs:element name="unique-column" type="unique-column" minOccurs="1" maxOccurs="unbounded"/>
266                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
267                </xs:choice>
268                <xs:attribute name="name" type="index_name" use="optional"/>
269        </xs:complexType>
270
271        <xs:complexType name="index-column">
272                <xs:sequence>
273                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
274                </xs:sequence>
275                <xs:attribute name="name" type="column_name" use="required"/>
276                <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
277        </xs:complexType>
278
279        <xs:complexType name="unique-column">
280                <xs:sequence>
281                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
282                </xs:sequence>
283                <xs:attribute name="name" type="column_name" use="required"/>
284                <xs:attribute name="size" type="xs:positiveInteger" use="optional"/>
285        </xs:complexType>
286
287        <xs:complexType name="inheritance">
288                <xs:attribute name="key" type="xs:string" use="required"/>
289                <xs:attribute name="class" type="xs:string" use="required"/>
290                <xs:attribute name="package" type="xs:string" use="optional"/>
291                <xs:attribute name="extends" type="xs:string" use="optional"/>
292        </xs:complexType>
293
294        <xs:complexType name="reference">
295                <xs:attribute name="local" type="column_name" use="required"/>
296                <xs:attribute name="foreign" type="column_name" use="required"/>
297        </xs:complexType>
298
299        <xs:complexType name="behavior">
300                <xs:choice maxOccurs="unbounded">
301                        <xs:element name="parameter" type="parameter" minOccurs="0" maxOccurs="unbounded"/>
302                </xs:choice>
303                <xs:attribute name="name" type="xs:string" use="required"/>
304        </xs:complexType>
305
306        <xs:complexType name="column">
307                <xs:choice maxOccurs="unbounded">
308                        <xs:element name="inheritance" type="inheritance" minOccurs="0" maxOccurs="unbounded"/>
309                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
310                </xs:choice>
311                <xs:attribute name="name" type="column_name" use="required">
312                        <xs:annotation>
313                                <xs:documentation xml:lang="en">
314                                        The name of the column as it appears in the database.
315                                </xs:documentation>
316                        </xs:annotation>
317                </xs:attribute>
318                <xs:attribute name="phpName" type="php_name" use="optional">
319                        <xs:annotation>
320                                <xs:documentation xml:lang="en">
321                                        Name used in PHP code to reference this column (in getters, setters, etc.). Defaults to the name transformed by the phpNamingMethod, which defaults to a CamelCase converter. So by default, a column named 'author_id' receives 'AuthorId' as phpName.
322                                </xs:documentation>
323                        </xs:annotation>
324                </xs:attribute>
325                <xs:attribute name="peerName" type="php_class" use="optional">
326                        <xs:annotation>
327                                <xs:documentation xml:lang="en">
328                                        Name used for the class constant corresponding to this column in PHP code. Defaults to the uppercase name, so a column named 'author_id' receives 'AUTHOR_ID' as peerName.
329                                </xs:documentation>
330                        </xs:annotation>
331                </xs:attribute>
332                <xs:attribute name="prefix" type="column_name" use="optional"/>
333                <xs:attribute name="accessorVisibility" type="visibility" use="optional">
334                        <xs:annotation>
335                                <xs:documentation xml:lang="en">
336                                        Visibility for the column accessor method. 'public' by default, also accepts 'protected' and 'private'.
337                                </xs:documentation>
338                        </xs:annotation>
339                </xs:attribute>
340                <xs:attribute name="mutatorVisibility" type="visibility" use="optional">
341                        <xs:annotation>
342                                <xs:documentation xml:lang="en">
343                                        Visibility for the column mutator method. 'public' by default, also accepts 'protected' and 'private'.
344                                </xs:documentation>
345                        </xs:annotation>
346                </xs:attribute>
347                <xs:attribute name="primaryKey" type="xs:boolean" default="false">
348                        <xs:annotation>
349                                <xs:documentation xml:lang="en">
350                                        Set to true to add a primary key on this column.
351                                </xs:documentation>
352                        </xs:annotation>
353                </xs:attribute>
354                <xs:attribute name="required" type="xs:boolean" default="false">
355                        <xs:annotation>
356                                <xs:documentation xml:lang="en">
357                                        Set to true to forbid NULL values.
358                                </xs:documentation>
359                        </xs:annotation>
360                </xs:attribute>
361                <xs:attribute name="type" type="datatype" default="VARCHAR">
362                        <xs:annotation>
363                                <xs:documentation xml:lang="en">
364                                        Any of the Propel supported data types. These types are database-agnostic, and converted to the native database type according to the connection.
365                                </xs:documentation>
366                        </xs:annotation>
367                </xs:attribute>
368                <xs:attribute name="sqlType" type="sql_type" use="optional">
369                        <xs:annotation>
370                                <xs:documentation xml:lang="en">
371                                        Native database column type.
372                                </xs:documentation>
373                        </xs:annotation>
374                </xs:attribute>
375                <xs:attribute name="phpType" type="php_type" use="optional">
376                        <xs:annotation>
377                                <xs:documentation xml:lang="en">
378                                        PHP type for te column in PHP code. This column's setter uses type casting with the set php_type; besides, generated phpDoc in the model classes use this attribute for code completion.
379                                </xs:documentation>
380                        </xs:annotation>
381                </xs:attribute>
382                <xs:attribute name="size" type="xs:nonNegativeInteger" use="optional">
383                        <xs:annotation>
384                                <xs:documentation xml:lang="en">
385                                        Numeric length of the column.
386                                </xs:documentation>
387                        </xs:annotation>
388                </xs:attribute>
389                <xs:attribute name="scale" type="xs:nonNegativeInteger" use="optional">
390                        <xs:annotation>
391                                <xs:documentation xml:lang="en">
392                                        Digits after decimal place
393                                </xs:documentation>
394                        </xs:annotation>
395                </xs:attribute>
396                <xs:attribute name="default" type="xs:string" use="optional">
397                        <xs:annotation>
398                                <xs:documentation xml:lang="en">
399                                        Synonym for defaultValue
400                                </xs:documentation>
401                        </xs:annotation>
402                </xs:attribute>
403                <xs:attribute name="defaultValue" type="xs:string" use="optional">
404                        <xs:annotation>
405                                <xs:documentation xml:lang="en">
406                                        The default value that the object will have for this column in the PHP instance after creating a "new Object". This value is always interpreted as a string. See defaultExpr for setting an SQL function as a default value.
407                                </xs:documentation>
408                        </xs:annotation>
409                </xs:attribute>
410                <xs:attribute name="defaultExpr" type="xs:string" use="optional">
411                        <xs:annotation>
412                                <xs:documentation xml:lang="en">
413                                        The default value for this column as expressed in SQL. This value is used solely for the "sql" target which builds your database from the schema.xml file. The defaultExpr is the SQL expression used as the "default" for the column.
414                                </xs:documentation>
415                        </xs:annotation>
416                </xs:attribute>
417                <xs:attribute name="autoIncrement" type="xs:boolean" default="false"/>
418                <xs:attribute name="inheritance" type="inh_option" default="false"/>
419                <xs:attribute name="inputValidator" type="xs:string" use="optional"/>
420                <xs:attribute name="phpNamingMethod" type="phpnamingmethod" use="optional">
421                        <xs:annotation>
422                                <xs:documentation xml:lang="en">
423                                        Name of the method used to transform the column name into a phpName. Defaults to 'clean', which Removes any character that is not a letter or a number and capitilizes the first letter of the name, the first letter of each alphanumeric block, and converts the rest of the letters to lowercase. Possible values: any of the PhpNameGenerator CONV_METHOD_XXX constants (clean, underscore, phpName, nochange).
424                                </xs:documentation>
425                        </xs:annotation>
426                </xs:attribute>
427                <xs:attribute name="description" type="xs:string" use="optional">
428                        <xs:annotation>
429                                <xs:documentation xml:lang="en">
430                                        A text description of the column. It gets added to the SQL CREATE table as a comment, and appears in the phpDoc bloc of the related getter and setter methods in the ActiveRecord class.
431                                </xs:documentation>
432                        </xs:annotation>
433                </xs:attribute>
434                <xs:attribute name="lazyLoad" type="xs:boolean" default="false">
435                        <xs:annotation>
436                                <xs:documentation xml:lang="en">
437                                        Set to true to skip this column by default during hydration. That means that this column will be hydrated on demand, using a supplementary query. Mostly useful for LOB columns.
438                                </xs:documentation>
439                        </xs:annotation>
440                </xs:attribute>
441                <xs:attribute name="nodeKeySep" type="xs:string" use="optional">
442                        <xs:annotation>
443                                <xs:documentation xml:lang="en">
444                                        (DEPRECATED) For use with treeMode table attribute.
445                                </xs:documentation>
446                        </xs:annotation>
447                </xs:attribute>
448                <xs:attribute name="nodeKey" type="xs:string" use="optional">
449                        <xs:annotation>
450                                <xs:documentation xml:lang="en">
451                                        (DEPRECATED) For use with treeMode table attribute.
452                                </xs:documentation>
453                        </xs:annotation>
454                </xs:attribute>
455                <xs:attribute name="nestedSetLeftKey" type="xs:boolean" default="false">
456                        <xs:annotation>
457                                <xs:documentation xml:lang="en">
458                                        (DEPRECATED) For use with treeMode table attribute.
459                                </xs:documentation>
460                        </xs:annotation>
461                </xs:attribute>
462                <xs:attribute name="nestedSetRightKey" type="xs:boolean" default="false">
463                        <xs:annotation>
464                                <xs:documentation xml:lang="en">
465                                        (DEPRECATED) For use with treeMode table attribute.
466                                </xs:documentation>
467                        </xs:annotation>
468                </xs:attribute>
469                <xs:attribute name="treeScopeKey" type="xs:boolean" default="false">
470                        <xs:annotation>
471                                <xs:documentation xml:lang="en">
472                                        (DEPRECATED) For use with treeMode table attribute.
473                                </xs:documentation>
474                        </xs:annotation>
475                </xs:attribute>
476                <xs:attribute name="primaryString" type="xs:boolean" default="false">
477                        <xs:annotation>
478                                <xs:documentation xml:lang="en">
479                                         A column defined as primary string serves as default value for a `__toString()` method in the generated Propel object.
480                                </xs:documentation>
481                        </xs:annotation>
482                </xs:attribute>
483        </xs:complexType>
484
485        <xs:complexType name="foreign-key">
486                <xs:choice maxOccurs="unbounded">
487                        <xs:element name="reference" type="reference" minOccurs="1" maxOccurs="unbounded">
488                                <xs:annotation>
489                                        <xs:documentation xml:lang="en">
490                                                A reference between a local and a foreign column. Composite foreign keys can have several references.
491                                        </xs:documentation>
492                                </xs:annotation>
493                        </xs:element>
494                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded"/>
495                </xs:choice>
496                <xs:attribute name="foreignTable" type="table_name" use="required">
497                        <xs:annotation>
498                                <xs:documentation xml:lang="en">
499                                        The other table name
500                                </xs:documentation>
501                        </xs:annotation>
502                </xs:attribute>
503                <xs:attribute name="name" type="foreign_name" use="optional">
504                        <xs:annotation>
505                                <xs:documentation xml:lang="en">
506                                        Name for this foreign key
507                                </xs:documentation>
508                        </xs:annotation>
509                </xs:attribute>
510                <xs:attribute name="phpName" type="php_name" use="optional">
511                        <xs:annotation>
512                                <xs:documentation xml:lang="en">
513                                        Name for the foreign object in methods generated in this class.
514                                </xs:documentation>
515                        </xs:annotation>
516                </xs:attribute>
517                <xs:attribute name="refPhpName" type="php_name" use="optional">
518                        <xs:annotation>
519                                <xs:documentation xml:lang="en">
520                                        Name for this object in methods generated in the foreign class
521                                </xs:documentation>
522                        </xs:annotation>
523                </xs:attribute>
524                <xs:attribute name="defaultJoin" type="xs:string" use="optional">
525                        <xs:annotation>
526                                <xs:documentation xml:lang="en">
527                                        This affects the default join type used in the generated `joinXXX()` methods in the model query class. Propel uses an INNER JOIN for foreign keys attached to a required column, and a LEFT JOIN for foreign keys attached to a non-required column, but you can override this in the foreign key element.
528                                </xs:documentation>
529                        </xs:annotation>
530                </xs:attribute>
531                <xs:attribute name="onDelete" type="delete" default="none"/>
532                <xs:attribute name="onUpdate" type="update" default="none"/>
533        </xs:complexType>
534
535        <xs:complexType name="external-schema">
536                <xs:attribute name="filename" type="file" use="required">
537                        <xs:annotation>
538                                <xs:documentation xml:lang="en">
539                                        The (absolute or relative to this schema dir name) path to the external schema file.
540                                </xs:documentation>
541                        </xs:annotation>
542                </xs:attribute>
543        </xs:complexType>
544
545        <xs:complexType name="table">
546
547                <xs:choice maxOccurs="unbounded">
548               
549                        <xs:element name="column" type="column" maxOccurs="unbounded">
550                                <xs:annotation>
551                                        <xs:documentation xml:lang="en">
552                                                A column of the table
553                                        </xs:documentation>
554                                </xs:annotation>
555                        </xs:element>
556                       
557                        <xs:element name="foreign-key" type="foreign-key" minOccurs="0" maxOccurs="unbounded">
558                                <xs:annotation>
559                                        <xs:documentation xml:lang="en">
560                                                A foreign key on one or several columns in this table, referencing a foreign table
561                                        </xs:documentation>
562                                </xs:annotation>
563                        </xs:element>
564                       
565                        <xs:element name="index" type="index" minOccurs="0" maxOccurs="unbounded">
566                                <xs:annotation>
567                                        <xs:documentation xml:lang="en">
568                                                An index on one or several columns of the current table
569                                        </xs:documentation>
570                                </xs:annotation>
571                        </xs:element>
572                       
573                        <xs:element name="unique" type="unique" minOccurs="0" maxOccurs="unbounded">
574                                <xs:annotation>
575                                        <xs:documentation xml:lang="en">
576                                                A unique index on one or several columns of the current table
577                                        </xs:documentation>
578                                </xs:annotation>
579                        </xs:element>
580                       
581                        <xs:element name="id-method-parameter" type="id-method-parameter" minOccurs="0" maxOccurs="unbounded">
582                                <xs:annotation>
583                                        <xs:documentation xml:lang="en">
584                                                If you are using a database that uses sequences for auto-increment columns (e.g. PostgreSQL or Oracle), you can customize the name of the sequence using this tag
585                                        </xs:documentation>
586                                </xs:annotation>
587                        </xs:element>
588                       
589                        <xs:element name="validator" type="validator" minOccurs="0" maxOccurs="unbounded">
590                                <xs:annotation>
591                                        <xs:documentation xml:lang="en">
592                                                A validator to be executed on a given column at runtime
593                                        </xs:documentation>
594                                </xs:annotation>
595                        </xs:element>
596                       
597                        <xs:element name="behavior" type="behavior" minOccurs="0" maxOccurs="unbounded">
598                                <xs:annotation>
599                                        <xs:documentation xml:lang="en">
600                                                A behavior to be added to the current table. Can modify the table structure, as well as modify the runtime code of the generated Model objects linked to this table. Bundled behaviors include alternative_coding_standards, auto_add_pk, timestampable, sluggable, soft_delete, sortable, nested_set, query_cache, and concrete_inheritance.
601                                        </xs:documentation>
602                                </xs:annotation>
603                        </xs:element>
604                       
605                        <xs:element ref="vendor" minOccurs="0" maxOccurs="unbounded">
606                                <xs:annotation>
607                                        <xs:documentation xml:lang="en">
608                                                table attributes specific to a database vendor. Only supports MySQL specific table attributes for now (Charset, Collate, Checksum, Pack_keys, Delay_key_write).
609                                        </xs:documentation>
610                                </xs:annotation>
611                        </xs:element>
612                       
613                </xs:choice>
614                <xs:attribute name="name" type="table_name" use="required">
615                        <xs:annotation>
616                                <xs:documentation xml:lang="en">
617                                        The name of the table as it appears in the database.
618                                </xs:documentation>
619                        </xs:annotation>
620                </xs:attribute>
621                <xs:attribute name="phpName" type="php_class" use="optional">
622                        <xs:annotation>
623                                <xs:documentation xml:lang="en">
624                                        The name of the ActiveRecord class generated for this table. Defaults to the name transformed by the phpNamingMethod, which defaults to a CamelCase converter. So by default, a table named 'foo_author' receives 'FooAuthor' as phpName.
625                                </xs:documentation>
626                        </xs:annotation>
627                </xs:attribute>
628                <xs:attribute name="namespace" type="php_namespace" use="optional">
629                        <xs:annotation>
630                                <xs:documentation xml:lang="en">
631                                        The PHP 5.3 namespace to use for the generated model classes.
632                                </xs:documentation>
633                        </xs:annotation>
634                </xs:attribute>
635                <xs:attribute name="columnPrefix" type="column_name" use="optional"/>
636                <xs:attribute name="defaultAccessorVisibility" type="visibility" use="optional">
637                        <xs:annotation>
638                                <xs:documentation xml:lang="en">
639                                        Default visibility for column accessor methods. 'public' by default, also accepts 'protected' and 'private'.
640                                </xs:documentation>
641                        </xs:annotation>
642                </xs:attribute>
643                <xs:attribute name="defaultMutatorVisibility" type="visibility" use="optional">
644                        <xs:annotation>
645                                <xs:documentation xml:lang="en">
646                                        Default visibility for column mutator methods. 'public' by default, also accepts 'protected' and 'private'.
647                                </xs:documentation>
648                        </xs:annotation>
649                </xs:attribute>
650                <xs:attribute name="idMethod" type="idmethod" use="optional">
651                        <xs:annotation>
652                                <xs:documentation xml:lang="en">
653                                        Id method to use for auto-increment columns.
654                                </xs:documentation>
655                        </xs:annotation>
656                </xs:attribute>
657                <xs:attribute name="allowPkInsert" type="xs:boolean" default="false" use="optional">
658                        <xs:annotation>
659                                <xs:documentation xml:lang="en">
660                                         Can be used if you want to define the primary key of a new object being inserted. By default if idMethod is "native", Propel would throw an exception. However, in some cases this feature is useful, for example if you do some replication of data in an master-master environment.
661                                </xs:documentation>
662                        </xs:annotation>
663                </xs:attribute>
664                <xs:attribute name="skipSql" type="xs:boolean" default="false">
665                        <xs:annotation>
666                                <xs:documentation xml:lang="en">
667                                        Instructs Propel not to generate DDL SQL for the specified table. This can be used together with readOnly for supperting VIEWS in Propel
668                                </xs:documentation>
669                        </xs:annotation>
670                </xs:attribute>
671                <xs:attribute name="readOnly" type="xs:boolean" default="false">
672                        <xs:annotation>
673                                <xs:documentation xml:lang="en">
674                                        Suppresses the mutator/setter methods, save() and delete() methods.
675                                </xs:documentation>
676                        </xs:annotation>
677                </xs:attribute>
678                <xs:attribute name="abstract" type="xs:boolean" default="false">
679                        <xs:annotation>
680                                <xs:documentation xml:lang="en">
681                                        Whether the generated stub class will be abstract (e.g. if you're using inheritance)
682                                </xs:documentation>
683                        </xs:annotation>
684                </xs:attribute>
685                <xs:attribute name="baseClass" type="php_class" use="optional">
686                        <xs:annotation>
687                                <xs:documentation xml:lang="en">
688                                        Allows you to specify a class that the generated Propel objects should extend (in place of propel.om.BaseObject)
689                                </xs:documentation>
690                        </xs:annotation>
691                </xs:attribute>
692                <xs:attribute name="basePeer" type="php_class" use="optional">
693                        <xs:annotation>
694                                <xs:documentation xml:lang="en">
695                                        Instructs Propel to use a different SQL-generating BasePeer class (or sub-class of BasePeer).
696                                </xs:documentation>
697                        </xs:annotation>
698                </xs:attribute>
699                <xs:attribute name="alias" type="table_name" use="optional"/>
700                <xs:attribute name="package" type="xs:string" use="optional">
701                        <xs:annotation>
702                                <xs:documentation xml:lang="en">
703                                        Specifies the "package" for the generated classes. Classes are created in subdirectories according to the package attribute value.
704                                </xs:documentation>
705                        </xs:annotation>
706                </xs:attribute>
707                <xs:attribute name="interface" type="xs:string" use="optional"/>
708                <xs:attribute name="phpNamingMethod" type="phpnamingmethod" use='optional'>
709                        <xs:annotation>
710                                <xs:documentation xml:lang="en">
711                                        Name of the method used to transform the table name into a phpName. Defaults to 'clean', which Removes any character that is not a letter or a number and capitilizes the first letter of the name, the first letter of each alphanumeric block, and converts the rest of the letters to lowercase. Possible values: any of the PhpNameGenerator CONV_METHOD_XXX constants (clean, underscore, phpName, nochange).
712                                </xs:documentation>
713                        </xs:annotation>
714                </xs:attribute>
715                <xs:attribute name="heavyIndexing" type="xs:boolean" use="optional">
716                        <xs:annotation>
717                                <xs:documentation xml:lang="en">
718                                        Adds indexes for each component of the primary key (when using composite primary keys)
719                                </xs:documentation>
720                        </xs:annotation>
721                </xs:attribute>
722                <xs:attribute name="description" type="xs:string" use="optional">
723                        <xs:annotation>
724                                <xs:documentation xml:lang="en">
725                                        A text description of the table. It gets added to the SQL CREATE table as a comment, and appears in the phpDoc bloc of the related ActiveRecord class.
726                                </xs:documentation>
727                        </xs:annotation>
728                </xs:attribute>
729                <xs:attribute name="treeMode" type="treemode" use="optional">
730                        <xs:annotation>
731                                <xs:documentation xml:lang="en">
732                                        Used to indicate that this table is part of a node tree. Currently the only supported values are "NestedSet" and "MaterializedPath" (DEPRECATED: use nested_set behavior instead).
733                                </xs:documentation>
734                        </xs:annotation>
735                </xs:attribute>
736                <xs:attribute name="reloadOnInsert" type="xs:boolean" default="false">
737                        <xs:annotation>
738                                <xs:documentation xml:lang="en">
739                                        Indicate that the object should be reloaded from the database when an INSERT is performed.  This is useful if you have triggers (or other server-side functionality like column default expressions) that alters the database row on INSERT.
740                                </xs:documentation>
741                        </xs:annotation>
742                </xs:attribute>
743                <xs:attribute name="reloadOnUpdate" type="xs:boolean" default="false">
744                        <xs:annotation>
745                                <xs:documentation xml:lang="en">
746                                         Indicate that the object should be reloaded from the database when an UPDATE is performed.  This is useful if you have triggers (or other server-side functionality like column default expressions) that alters the database row on UPDATE.
747                                </xs:documentation>
748                        </xs:annotation>
749                </xs:attribute>
750                <xs:attribute name="isCrossRef" type="xs:boolean" default="false">
751                        <xs:annotation>
752                                <xs:documentation xml:lang="en">
753                                        Set to true if the current table is a cross-reference table in a many-to-many relationship to allow generation of getter and setter in each of the tables of the relationship.
754                                </xs:documentation>
755                        </xs:annotation>
756                </xs:attribute>
757        </xs:complexType>
758
759        <xs:complexType name="database">
760                <xs:choice maxOccurs="unbounded">
761                        <xs:element name="external-schema" type="external-schema" minOccurs="0" maxOccurs="unbounded">
762                                <xs:annotation>
763                                        <xs:documentation xml:lang="en">
764                                                Embed an external schema file into the current schema. Accepts absolute and relative schema file paths.
765                                        </xs:documentation>
766                                </xs:annotation>
767                        </xs:element>
768                        <xs:element name="table" type="table" minOccurs="1" maxOccurs="unbounded">
769                                <xs:annotation>
770                                        <xs:documentation xml:lang="en">
771                                                A table using the database connection.
772                                        </xs:documentation>
773                                </xs:annotation>
774                        </xs:element>
775                        <xs:element name="behavior" type="behavior" minOccurs="0" maxOccurs="unbounded">
776                                <xs:annotation>
777                                        <xs:documentation xml:lang="en">
778                                                Behavior to be applied to all the database tables
779                                        </xs:documentation>
780                                </xs:annotation>
781                        </xs:element>
782                </xs:choice>
783                <xs:attribute name="name" type="xs:string" use="optional">
784                        <xs:annotation>
785                                <xs:documentation xml:lang="en">
786                                        The name of the table in the database. Propel advocates the use of singular table names.
787                                </xs:documentation>
788                        </xs:annotation>
789                </xs:attribute>
790                <xs:attribute name="defaultIdMethod" type="dbidmethod" default="none">
791                        <xs:annotation>
792                                <xs:documentation xml:lang="en">
793                                        Default id method to use for auto-increment columns
794                                </xs:documentation>
795                        </xs:annotation>
796                </xs:attribute>
797                <xs:attribute name="defaultTranslateMethod" type="xs:string" use="optional"/>
798                <xs:attribute name="defaultAccessorVisibility" type="visibility" use="optional">
799                        <xs:annotation>
800                                <xs:documentation xml:lang="en">
801                                        Default visibility for column accessor methods. 'public' by default, also accepts 'protected' and 'private'.
802                                </xs:documentation>
803                        </xs:annotation>
804                </xs:attribute>
805                <xs:attribute name="defaultMutatorVisibility" type="visibility" use="optional">
806                        <xs:annotation>
807                                <xs:documentation xml:lang="en">
808                                        Default visibility for column mutator methods. 'public' by default, also accepts 'protected' and 'private'.
809                                </xs:documentation>
810                        </xs:annotation>
811                </xs:attribute>
812                <xs:attribute name="package" type="php_class" use="optional">
813                        <xs:annotation>
814                                <xs:documentation xml:lang="en">
815                                        Specifies the "package" for the generated classes. Classes are created in subdirectories according to the package attribute value.
816                                </xs:documentation>
817                        </xs:annotation>
818                </xs:attribute>
819                <xs:attribute name="namespace" type="php_namespace" use="optional">
820                        <xs:annotation>
821                                <xs:documentation xml:lang="en">
822                                        The PHP 5.3 namespace to use for the generated model classes of the database. Can be overridden on a per-table basis.
823                                </xs:documentation>
824                        </xs:annotation>
825                </xs:attribute>
826                <xs:attribute name="baseClass" type="php_class" use="optional">
827                        <xs:annotation>
828                                <xs:documentation xml:lang="en">
829                                        Allows to specify a default base class that all generated Propel objects should extend (in place of propel.om.BaseObject)
830                                </xs:documentation>
831                        </xs:annotation>
832                </xs:attribute>
833                <xs:attribute name="basePeer" type="php_class" use="optional">
834                        <xs:annotation>
835                                <xs:documentation xml:lang="en">
836                                        Instructs Propel to use a different SQL-generating BasePeer class (or sub-class of BasePeer) for all generated objects
837                                </xs:documentation>
838                        </xs:annotation>
839                </xs:attribute>
840                <xs:attribute name="defaultPhpNamingMethod" type="phpnamingmethod" default="underscore">
841                        <xs:annotation>
842                                <xs:documentation xml:lang="en">
843                                        The default naming method to use in this database.
844                                </xs:documentation>
845                        </xs:annotation>
846                </xs:attribute>
847                <xs:attribute name="heavyIndexing" type="xs:boolean" default="false">
848                        <xs:annotation>
849                                <xs:documentation xml:lang="en">
850                                        Adds indexes for each component of the primary key (when using composite primary keys)
851                                </xs:documentation>
852                        </xs:annotation>
853                </xs:attribute>
854                <xs:attribute name="tablePrefix" type="xs:string" use="optional">
855                        <xs:annotation>
856                                <xs:documentation xml:lang="en">
857                                        Adds a prefix to all the SQL table names
858                                </xs:documentation>
859                        </xs:annotation>
860                </xs:attribute>
861        </xs:complexType>
862</xs:schema>
Note: See TracBrowser for help on using the repository browser.