blob: 354aa14700d6af0113e9d0c2e37c0b04e4c598b6 [file] [log] [blame]
<?xml version="1.0" encoding="ISO-8859-1" standalone="no"?>
<!DOCTYPE database SYSTEM "http://db.apache.org/torque/dtd/database_3_1.dtd">
<!--
/*
* Copyright 2001-2004 The Apache Software Foundation.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
-->
<!-- ==================================================================== -->
<!-- -->
<!-- B A S E T U R B I N E S C H E M A -->
<!-- -->
<!-- ==================================================================== -->
<!-- This is the the XML schema used by Torque to generate the necessary -->
<!-- sources used to create/initialize the base Turbine system. Torque -->
<!-- will create the SQL for the database required by Turbine, and the -->
<!-- Peer-based Object Model used by Turbine internally to manage -->
<!-- users and security. -->
<!-- ==================================================================== -->
<!-- @author: <a href="mailto:hps@intermeta.de">Henning P. Schmiedehausen</a> -->
<!-- @version $Id$ -->
<!-- ==================================================================== -->
<database name="@DATABASE_DEFAULT@">
<table name="TURBINE_PERMISSION" idMethod="idbroker">
<column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="Name"/>
<unique>
<unique-column name="PERMISSION_NAME"/>
</unique>
</table>
<table name="TURBINE_ROLE" idMethod="idbroker">
<column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="Name"/>
<unique>
<unique-column name="ROLE_NAME"/>
</unique>
</table>
<table name="TURBINE_GROUP" idMethod="idbroker">
<column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="Name"/>
<unique>
<unique-column name="GROUP_NAME"/>
</unique>
</table>
<table name="TURBINE_ROLE_PERMISSION">
<column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER"/>
<foreign-key foreignTable="TURBINE_ROLE">
<reference local="ROLE_ID" foreign="ROLE_ID"/>
</foreign-key>
<foreign-key foreignTable="TURBINE_PERMISSION">
<reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
</foreign-key>
</table>
<table name="TURBINE_USER" idMethod="idbroker">
<column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="UserName"/>
<column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
<column name="FIRST_NAME" required="true" size="64" type="VARCHAR"/>
<column name="LAST_NAME" required="true" size="64" type="VARCHAR"/>
<column name="EMAIL" size="64" type="VARCHAR"/>
<column name="CONFIRM_VALUE" size="16" type="VARCHAR" javaName="Confirmed"/>
<column name="MODIFIED" type="TIMESTAMP"/>
<column name="CREATED" type="TIMESTAMP" javaName="CreateDate"/>
<column name="LAST_LOGIN" type="TIMESTAMP"/>
<column name="OBJECTDATA" type="VARBINARY"/>
<unique>
<unique-column name="LOGIN_NAME"/>
</unique>
</table>
<table name="TURBINE_USER_GROUP_ROLE">
<column name="USER_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER"/>
<column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER"/>
<foreign-key foreignTable="TURBINE_USER">
<reference local="USER_ID" foreign="USER_ID"/>
</foreign-key>
<foreign-key foreignTable="TURBINE_GROUP">
<reference local="GROUP_ID" foreign="GROUP_ID"/>
</foreign-key>
<foreign-key foreignTable="TURBINE_ROLE">
<reference local="ROLE_ID" foreign="ROLE_ID"/>
</foreign-key>
</table>
</database>