<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>

<database package="core.book" name="bookstore" defaultIdMethod="native" namespace="Propel\Tests\Bookstore">
  <external-schema filename="external/author.schema.xml"/>
  <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"/>
      <foreign-key foreignTable="publisher" onDelete="setnull">
          <reference local="publisher_id" foreign="id"/>
      </foreign-key>
      <foreign-key foreignTable="author" onDelete="setnull" onUpdate="cascade">
          <reference local="author_id" foreign="id"/>
      </foreign-key>
  </table>

</database>
