<?xml version="1.0" encoding="UTF-8"?>
<schema xmlns:php="http://www.w3.org/1999/XSL/Transform" project="phpclasses contribution" name="SampleUser Model">
  <table name="groups" type="InnoDB" characterSet="utf8" auto="4" schema="mydb">
    <column name="id" type="int" isPrimary="true" auto="true" isRequired="true" size="11"/>
    <column name="group_name" type="varchar" isRequired="true" size="100"/>
  </table>
  <table name="user_groups" type="InnoDB" characterSet="utf8" auto="" schema="mydb">
    <column name="group_id" type="int" isPrimary="true" isRequired="true" size="11" index="group_id"/>
    <column name="user_id" type="int" isPrimary="true" isRequired="true" size="11" index="user_id"/>
    <association name="fk_groups_users" reltype="one-to-many" column="group_id" refSchema="mydb" refTable="groups" refColumn="id" deleteRule="NO ACTION" updateRule="NO ACTION"/>
    <association name="fk_users_groups" reltype="one-to-many" column="user_id" refSchema="mydb" refTable="users" refColumn="id" deleteRule="NO ACTION" updateRule="NO ACTION"/>
  </table>
  <table name="user_addresses" type="InnoDB" characterSet="utf8" auto="2" schema="mydb">
    <column name="id" type="int" isPrimary="true" auto="true" isRequired="true" size="11"/>
    <column name="street_name" type="varchar" size="255" default="NULL"/>
    <column name="zip_code" type="varchar" size="10" default="NULL"/>
  </table>
  <table name="user_profiles" type="InnoDB" characterSet="utf8" auto="" schema="mydb">
    <column name="user_profile_id" type="int" isPrimary="true" isRequired="true" size="11"/>
    <column name="first_name" type="varchar" size="255" default="NULL"/>
    <column name="last_name" type="varchar" size="255" default="NULL"/>
    <association name="fk_user_profiles_users" reltype="one-to-many" column="user_profile_id" refSchema="mydb" refTable="users" refColumn="id" deleteRule="NO ACTION" updateRule="NO ACTION"/>
  </table>
  <table name="users" type="InnoDB" characterSet="utf8" auto="13" schema="mydb">
    <column name="id" type="int" isPrimary="true" auto="true" isRequired="true" size="11"/>
    <column name="user_name" type="varchar" isRequired="true" size="100"/>
    <column name="address_id" type="int" size="11" default="NULL" index="address_id"/>
    <association name="fk_user_addresses_users" reltype="one-to-many" column="address_id" refSchema="mydb" refTable="user_addresses" refColumn="id" deleteRule="NO ACTION" updateRule="NO ACTION"/>
  </table>
  <comment>
    <author>Thomas Schäfer</author>
    <mail>thomas.schaefer@query4u.de</mail>
    <generatedAt>2013-05-18 09:25</generatedAt>
    <createdAt>2012-04-19 18:15</createdAt>
    <modifiedAt>2012-04-20 15:07</modifiedAt>
  </comment>
</schema>
