propel-bundle/Tests/Fixtures/schema.xml
2013-11-04 00:10:23 +00:00

22 lines
1.4 KiB
XML

<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<database name="bookstore" defaultIdMethod="native">
<table name="book" description="Book Table">
<column name="id" required="true" primaryKey="true" autoIncrement="true" type="INTEGER" description="Book Id" />
<column name="title" type="VARCHAR" required="true" description="Book Title" primaryString="true" />
<column name="isbn" required="true" type="VARCHAR" size="24" phpName="ISBN" description="ISBN Number" primaryString="false" />
<column name="price" required="false" type="FLOAT" description="Price of the book." />
<column name="publisher_id" required="false" type="INTEGER" description="Foreign Key Publisher" />
<column name="author_id" required="false" type="INTEGER" description="Foreign Key Author" />
<validator column="title" translate="none">
<rule name="unique" message="Book title already in database." />
<rule name="minLength" value="10" message="Book title must be more than ${value} characters long." />
<rule name="maxLength" value="255" message="Book title must not be longer than ${value} characters." />
</validator>
<validator column="isbn" translate="none">
<rule name="class" class="bookstore.validator.ISBNValidator" message="ISBN does not validate!"/>
</validator>
</table>
</database>