Skip to content

Instantly share code, notes, and snippets.

@will1471
Created June 1, 2014 11:44
Show Gist options
  • Save will1471/6e8bf2d98e69501618f2 to your computer and use it in GitHub Desktop.
Save will1471/6e8bf2d98e69501618f2 to your computer and use it in GitHub Desktop.
<?xml version="1.0" encoding="UTF-8"?>
<database name="foo"
namespace="Foo"
defaultIdMethod="native"
heavyIndexing="true"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd" >
<vendor type="mysql">
<parameter name="Charset" value="utf8"/>
<parameter name="Collate" value="utf8_unicode_ci"/>
</vendor>
<table name="child">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" />
<column name="name" type="varchar" size="255" required="true" />
<unique>
<unique-column name="name" />
</unique>
</table>
<table name="bar">
<column name="id" type="integer" required="true" primaryKey="true" autoIncrement="true" />
<column name="name" type="varchar" size="255" required="true" />
<unique>
<unique-column name="name" />
</unique>
</table>
<table name="child_bar">
<column name="child_id" type="integer" required="true" primaryKey="true" />
<column name="bar_id" type="integer" required="true" primaryKey="true" />
<foreign-key foreignTable="child">
<reference local="child_id" foreign="id" />
</foreign-key>
<foreign-key foreignTable="bar">
<reference local="bar_id" foreign="id" />
</foreign-key>
</table>
</database>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment