|
|
|
<database name="default" defaultIdMethod="native"
|
|
|
|
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
|
|
|
|
xsi:noNamespaceSchemaLocation="http://xsd.propelorm.org/1.6/database.xsd"
|
|
|
|
namespace="Eater\Glim\Model"
|
|
|
|
>
|
|
|
|
<table name="User">
|
|
|
|
<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
|
|
|
|
<column name="max_keys" type="integer" default="5" />
|
|
|
|
<column name="username" type="varchar" size="64" />
|
|
|
|
<column name="password" type="varchar" size="64" />
|
|
|
|
<column name="superuser" type="boolean" default="false" />
|
|
|
|
|
|
|
|
<unique>
|
|
|
|
<unique-column name="username" />
|
|
|
|
</unique>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table name="Certificate">
|
|
|
|
<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
|
|
|
|
<column name="user_id" type="integer" />
|
|
|
|
<column name="name" type="varchar" size="64" />
|
|
|
|
<column name="certificate" type="longvarchar" />
|
|
|
|
<column name="expires_on" type="timestamp" />
|
|
|
|
<column name="revoked" type="boolean" default="false" />
|
|
|
|
<column name="serial" type="varchar" size="64" />
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<index-column name="user_id" />
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<index>
|
|
|
|
<index-column name="serial" />
|
|
|
|
</index>
|
|
|
|
|
|
|
|
<unique>
|
|
|
|
<unique-column name="name" />
|
|
|
|
<unique-column name="user_id" />
|
|
|
|
</unique>
|
|
|
|
|
|
|
|
<foreign-key foreignTable="User">
|
|
|
|
<reference local="user_id" foreign="id" />
|
|
|
|
</foreign-key>
|
|
|
|
</table>
|
|
|
|
|
|
|
|
<table name="Invite">
|
|
|
|
<column name="id" type="integer" primaryKey="true" autoIncrement="true" />
|
|
|
|
<column name="invite" type="varchar" size="64" />
|
|
|
|
</table>
|
|
|
|
</database>
|