blob: 43f32219af190c7c06d444bffffcd4415f357736 [file] [log] [blame]
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!--
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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.
-->
<!-- ==================================================================== -->
<!-- -->
<!-- F U L C R U M T U R B I N E S E C U R I T Y S C H E M A -->
<!-- -->
<!-- ==================================================================== -->
<!-- @author: <a href="mailto:tv@apache.org">Thomas Vandahl</a> -->
<!-- @version $Id$ -->
<!-- ==================================================================== -->
<database name="fulcrum"
defaultIdMethod="none"
xmlns="http://db.apache.org/torque/5.0/templates/database"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://db.apache.org/torque/5.0/templates/database
http://db.apache.org/torque/torque-5.0/documentation/orm-reference/database-5-0.xsd">
<!--
after Torque 4.1 is released, add attribute peerInterface="org.apache.fulcrum.security.torque.peer.TorqueTurbinePeer"
to tables FULCRUM_TURBINE_PERMISSION,FULCRUM_TURBINE_ROLE,FULCRUM_TURBINE_GROUP,FULCRUM_TURBINE_USER, cft. https://issues.apache.org/jira/browse/TRB-92 and https://issues.apache.org/jira/browse/TORQUE-309.
-->
<table name="FULCRUM_TURBINE_PERMISSION" javaName="TorqueTurbinePermission" idMethod="idbroker" baseClass="org.apache.fulcrum.security.torque.turbine.FulcrumAbstractTurbinePermission">
<column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
<column name="PERMISSION_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
<unique>
<unique-column name="PERMISSION_NAME"/>
</unique>
</table>
<table name="FULCRUM_TURBINE_ROLE" javaName="TorqueTurbineRole" idMethod="idbroker"
baseClass="org.apache.fulcrum.security.torque.turbine.FulcrumAbstractTurbineRole">
<column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
<column name="ROLE_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
<unique>
<unique-column name="ROLE_NAME"/>
</unique>
</table>
<table name="FULCRUM_TURBINE_GROUP" javaName="TorqueTurbineGroup" idMethod="idbroker"
baseClass="org.apache.fulcrum.security.torque.turbine.FulcrumAbstractTurbineGroup">
<column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
<column name="GROUP_NAME" required="true" type="VARCHAR" size="64" javaName="EntityName"/>
<unique>
<unique-column name="GROUP_NAME"/>
</unique>
</table>
<table name="FULCRUM_TURBINE_USER" javaName="TorqueTurbineUser" idMethod="idbroker"
baseClass="org.apache.fulcrum.security.torque.turbine.FulcrumAbstractTurbineUser"
interface="org.apache.fulcrum.security.model.turbine.entity.TurbineUser">
<column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaName="EntityId" javaType="object"/>
<column name="LOGIN_NAME" required="true" size="64" type="VARCHAR" javaName="EntityName"/>
<column name="PASSWORD_VALUE" required="true" size="16" type="VARCHAR" javaName="Password"/>
<column name="FIRST_NAME" size="64" type="VARCHAR" javaName="FirstName"/>
<column name="LAST_NAME" size="64" type="VARCHAR" javaName="LastName"/>
<column name="EMAIL" size="64" type="VARCHAR" javaName="Email"/>
<column name="OBJECTDATA" size="800" type="VARBINARY" javaName="Objectdata"/>
<unique>
<unique-column name="LOGIN_NAME"/>
</unique>
</table>
<!-- Turbine Security Model -->
<table name="TURBINE_ROLE_PERMISSION" interface="org.apache.fulcrum.security.torque.peer.TurbineRolePermissionPeerMapper"
javaName="TorqueTurbineRolePermission">
<column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
<column name="PERMISSION_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
<foreign-key foreignTable="FULCRUM_TURBINE_ROLE">
<reference local="ROLE_ID" foreign="ROLE_ID"/>
</foreign-key>
<foreign-key foreignTable="FULCRUM_TURBINE_PERMISSION">
<reference local="PERMISSION_ID" foreign="PERMISSION_ID"/>
</foreign-key>
</table>
<table name="TURBINE_USER_GROUP_ROLE" javaName="TorqueTurbineUserGroupRole"
interface="org.apache.fulcrum.security.torque.peer.TurbineUserGroupRoleModelPeerMapper"
peerInterface="org.apache.fulcrum.security.torque.peer.TorqueTurbineUserGroupRolePeer">
<column name="USER_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
<column name="GROUP_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
<column name="ROLE_ID" required="true" primaryKey="true" type="INTEGER" javaType="object"/>
<foreign-key foreignTable="FULCRUM_TURBINE_USER">
<reference local="USER_ID" foreign="USER_ID"/>
</foreign-key>
<foreign-key foreignTable="FULCRUM_TURBINE_GROUP">
<reference local="GROUP_ID" foreign="GROUP_ID"/>
</foreign-key>
<foreign-key foreignTable="FULCRUM_TURBINE_ROLE">
<reference local="ROLE_ID" foreign="ROLE_ID"/>
</foreign-key>
</table>
</database>