-14 Removals
+15 Additions
<?xml version="1.0"?>
<?xml version="1.0"?>
<multixml>
<multixml>
<database defaultIdMethod="native" name="bookstore" package="core.book">
<database defaultIdMethod="native" name="bookstore" package="core.book">
<external-schema filename="external/author.schema.xml"/>
<table description="Book Table" name="book">
<table description="Book Table" name="book">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column description="Foreign Key Author" name="author_id" type="INTEGER"/>
<column description="Foreign Key Author" name="author_id" required="false" type="INTEGER"/>
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="Integer"/>
<column description="ISBN Number" name="isbn" phpName="ISBN" required="true" size="24" type="VARCHAR"/>
<column description="ISBN Number" name="isbn" phpName="ISBN" required="true" size="24" type="VARCHAR"/>
<column description="Foreign Key Publisher" name="publisher_id" type="INTEGER"/>
<column description="Foreign Key Publisher" name="publisher_id" required="false" type="INTEGER"/>
<column description="Book Title" name="title" required="true" size="255" type="VARCHAR"/>
<column description="Book Title" name="title" required="true" size="255" type="VARCHAR"/>
<foreign-key foreignTable="author" onDelete="SETNULL">
<foreign-key foreignTable="author" onDelete="SETNULL">
<reference foreign="id" local="author_id"/>
<reference foreign="id" local="author_id"/>
</foreign-key>
</foreign-key>
<foreign-key foreignTable="publisher" onDelete="SETNULL">
<foreign-key foreignTable="publisher" onDelete="SETNULL">
<reference foreign="id" local="publisher_id"/>
<reference foreign="id" local="publisher_id"/>
</foreign-key>
</foreign-key>
<validator column="isbn">
<validator column="isbn" translate="none">
<rule message="The ISBN contains invalid characters." name="notMatch" value="/[^\d-]+/"/>
<rule message="The ISBN contains invalid characters." name="notMatch" value="/[^\d-]+/"/>
</validator>
</validator>
<validator column="title">
<validator column="title" translate="none">
<rule message="Book title must not be longer than ${value} characters." name="maxLength" value="255"/>
<rule message="Book title must not be longer than ${value} characters." name="maxLength" value="255"/>
<rule message="Book title must be more than ${value} characters long." name="minLength" value="10"/>
<rule message="Book title must be more than ${value} characters long." name="minLength" value="10"/>
<rule message="Book title already in database." name="unique"/>
<rule message="Book title already in database." name="unique"/>
</validator>
</validator>
</table>
</table>
<table name="media">
<table name="media">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column description="Book ID for this media collection." name="book_id" required="true" type="INTEGER"/>
<column description="Book ID for this media collection." name="book_id" required="true" type="INTEGER"/>
<column description="The image of the book cover." lazyLoad="true" name="cover_image" type="BLOB"/>
<column description="The image of the book cover." lazyLoad="true" name="cover_image" type="BLOB"/>
<column description="An excerpt from the book." lazyLoad="true" name="excerpt" type="CLOB"/>
<column description="An excerpt from the book." lazyLoad="true" name="excerpt" type="CLOB"/>
<foreign-key foreignTable="book" onDelete="CASCADE">
<foreign-key foreignTable="book" onDelete="CASCADE">
<reference foreign="id" local="book_id"/>
<reference foreign="id" local="book_id"/>
</foreign-key>
</foreign-key>
</table>
</table>
</database>
</database>
<database defaultIdMethod="native" name="bookstore" package="addon.club">
<database defaultIdMethod="native" name="bookstore" package="addon.club">
<!-- this table exists to test the many-to-many -->
<table description="Reading list for a book club." name="book_club_list">
<table description="Reading list for a book club." name="book_club_list">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column description="The name of the teacher in charge of summer reading." name="group_leader" required="true" size="100" type="VARCHAR"/>
<column description="The name of the teacher in charge of summer reading." name="group_leader" required="true" size="100" type="VARCHAR"/>
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="Integer"/>
<column description="The theme, if applicable, for the reading list." name="theme" required="false" size="50" type="VARCHAR"/>
<column description="The theme, if applicable, for the reading list." name="theme" size="50" type="VARCHAR"/>
</table>
</table>
<table description="Cross-reference table for many-to-many relationship between book rows and book_club_list rows." name="book_x_list" phpName="BookListRel">
<table description="Cross-reference table for many-to-many relationship between book rows and book_club_list rows." name="book_x_list" phpName="BookListRel">
<column description="Fkey to book_club_list.id" name="book_club_list_id" primaryKey="true" type="INTEGER"/>
<column description="Fkey to book_club_list.id" name="book_club_list_id" primaryKey="true" type="INTEGER"/>
<column description="Fkey to book.id" name="book_id" primaryKey="true" type="INTEGER"/>
<column description="Fkey to book.id" name="book_id" primaryKey="true" type="INTEGER"/>
<foreign-key foreignTable="book" onDelete="CASCADE">
<foreign-key foreignTable="book" onDelete="CASCADE">
<reference foreign="id" local="book_id"/>
<reference foreign="id" local="book_id"/>
</foreign-key>
</foreign-key>
<foreign-key foreignTable="book_club_list" onDelete="CASCADE">
<foreign-key foreignTable="book_club_list" onDelete="CASCADE">
<reference foreign="id" local="book_club_list_id"/>
<reference foreign="id" local="book_club_list_id"/>
</foreign-key>
</foreign-key>
</table>
</table>
</database>
</database>
<database defaultIdMethod="native" name="bookstore" package="core.author">
<database defaultIdMethod="native" name="bookstore" package="core.author">
<table description="Author Table" name="author">
<table description="Author Table" name="author">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column description="The authors age" name="age" type="INTEGER"/>
<column description="The authors age" name="age" type="INTEGER"/>
<column description="E-Mail Address" name="email" size="128" type="VARCHAR"/>
<column description="E-Mail Address" name="email" size="128" type="VARCHAR"/>
<column description="First Name" name="first_name" required="true" size="128" type="VARCHAR"/>
<column description="First Name" name="first_name" required="true" size="128" type="VARCHAR"/>
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="Integer"/>
<column description="Last Name" name="last_name" required="true" size="128" type="VARCHAR"/>
<column description="Last Name" name="last_name" required="true" size="128" type="VARCHAR"/>
<validator column="age">
<validator column="age" translate="none">
<rule message="Impressive age! Just kidding, hm?" name="maxValue" value="100"/>
<rule message="Impressive age! Just kidding, hm?" name="maxValue" value="100"/>
<rule message="Please enter a positive number." name="minValue" value="0"/>
<rule message="Please enter a positive number." name="minValue" value="0"/>
</validator>
</validator>
<validator column="email">
<validator column="email" translate="none">
<rule message="Please enter a valid email address." name="match" value="/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/"/>
<rule message="Please enter a valid email address." name="match" value="/^([a-zA-Z0-9])+([\.a-zA-Z0-9_-])*@([a-zA-Z0-9])+(\.[a-zA-Z0-9_-]+)+$/"/>
</validator>
</validator>
<validator column="last_name">
<validator column="last_name" translate="none">
<rule message="The last name field is required." name="required"/>
<rule message="The last name field is required." name="required"/>
</validator>
</validator>
</table>
</table>
</database>
</database>
<database defaultIdMethod="native" name="bookstore" package="core.book"/>
<database defaultIdMethod="native" name="bookstore" package="core.book">
<!-- This table exists to explore/test the handling of BLOB/CLOB objects. -->
</database>
<database defaultIdMethod="native" name="bookstore" package="core.publisher">
<database defaultIdMethod="native" name="bookstore" package="core.publisher">
<table description="Publisher Table" name="publisher">
<table description="Publisher Table" name="publisher">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column autoIncrement="true" name="id" primaryKey="true" required="true" type="Integer"/>
<column default="Penguin" description="Publisher Name" name="name" required="true" size="128" type="VARCHAR"/>
<column default="Penguin" description="Publisher Name" name="name" required="true" size="128" type="VARCHAR"/>
</table>
</table>
</database>
</database>
<database defaultIdMethod="native" name="bookstore" package="core.review">
<database defaultIdMethod="native" name="bookstore" package="core.review">
<table description="Book Review" name="review">
<table description="Book Review" name="review">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column description="Book ID for this review" name="book_id" required="true" type="INTEGER"/>
<column description="Book ID for this review" name="book_id" required="true" type="INTEGER"/>
<column description="Does reviewer recommend book?" name="recommended" required="true" type="BOOLEAN"/>
<column description="Does reviewer recommend book?" name="recommended" required="true" type="BOOLEAN"/>
<column default="01/01/2001" description="Date of Review" name="review_date" required="true" type="DATE"/>
<column default="01/01/2001" description="Date of Review" name="review_date" required="true" type="DATE"/>
<column description="Reviewer Name" name="reviewed_by" required="true" size="128" type="VARCHAR"/>
<column description="Reviewer Name" name="reviewed_by" required="true" size="128" type="VARCHAR"/>
<column description="The status of this review." name="status" size="8" type="VARCHAR"/>
<column description="The status of this review." name="status" size="8" type="VARCHAR"/>
<foreign-key foreignTable="book" onDelete="CASCADE">
<foreign-key foreignTable="book" onDelete="CASCADE">
<reference foreign="id" local="book_id"/>
<reference foreign="id" local="book_id"/>
</foreign-key>
</foreign-key>
<validator column="reviewed_by">
<validator column="reviewed_by" translate="none">
<rule message="The reviewed by field is required." name="required"/>
<rule message="The reviewed by field is required." name="required"/>
</validator>
</validator>
<validator column="status">
<validator column="status" translate="none">
<rule message="Invalid status. (new, reviewed, archived)" name="validValues" value="new|reviewed|archived"/>
<rule message="Invalid status. (new, reviewed, archived)" name="validValues" value="new|reviewed|archived"/>
</validator>
</validator>
</table>
</table>
</database>
</database>
<database defaultIdMethod="native" name="bookstore-log" package="util.log">
<database defaultIdMethod="native" name="bookstore-log" package="util.log">
<table description="Used to test multiple databases support" name="log" phpName="BookstoreLog">
<table description="Used to test multiple databases support" name="log" phpName="BookstoreLog">
<behavior name="auto_add_pk"/>
<behavior name="auto_add_pk"/>
<column description="Log priority" name="ident" required="true" size="24" type="CHAR"/>
<column description="Log priority" name="ident" required="true" size="24" type="CHAR"/>
<column description="Log message" name="message" required="true" type="LONGVARCHAR"/>
<column description="Log message" name="message" required="true" type="LONGVARCHAR"/>
<column description="Log priority" name="priority" required="true" type="INTEGER"/>
<column description="Log priority" name="priority" required="true" type="INTEGER"/>
<column description="Log time" name="time" required="true" type="TIMESTAMP"/>
<column description="Log time" name="time" required="true" type="TIMESTAMP"/>
</table>
</table>
</database>
</database>
</multixml>
</multixml>
Editor
Clear
Export as PDF