incubator-lokahi-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tob...@apache.org
Subject svn commit: r584847 - in /incubator/lokahi/lokahi/trunk: ./ conf/ database/mysql/ database/oracle/ src/java/org/apache/lokahi/core/api/job/ src/java/org/apache/lokahi/core/controller/
Date Mon, 15 Oct 2007 18:54:32 GMT
Author: toback
Date: Mon Oct 15 11:54:31 2007
New Revision: 584847

URL: http://svn.apache.org/viewvc?rev=584847&view=rev
Log:
Fixes to allow mysql support

Re: https://issues.apache.org/jira/browse/LOKAHI-2

Patch by Ludovic MaƮtre.

Modified:
    incubator/lokahi/lokahi/trunk/build.xml
    incubator/lokahi/lokahi/trunk/conf/db.properties
    incubator/lokahi/lokahi/trunk/conf/log4j.xml
    incubator/lokahi/lokahi/trunk/conf/lokahi.properties
    incubator/lokahi/lokahi/trunk/database/mysql/procs.sql
    incubator/lokahi/lokahi/trunk/database/mysql/tables.sql
    incubator/lokahi/lokahi/trunk/database/mysql/tmc_rel_function_user_data.sql
    incubator/lokahi/lokahi/trunk/database/mysql/views.sql
    incubator/lokahi/lokahi/trunk/database/oracle/tables.sql
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/job/Job.java
    incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/AdminBean.java

Modified: incubator/lokahi/lokahi/trunk/build.xml
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/build.xml?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/build.xml (original)
+++ incubator/lokahi/lokahi/trunk/build.xml Mon Oct 15 11:54:31 2007
@@ -32,6 +32,37 @@
     </copy>
   </target>
 
+  <target name="install-agent" depends="clean,build">
+    <mkdir dir="${agent.install.location}"/>
+    <copy todir="${agent.install.location}" overwrite="true">
+      <fileset dir="${app.build.agent}"/>
+    </copy>
+  </target>
+  
+  <target name="install-db" depends="init,copy-db">
+     <sql driver="${database.driver}" password="${database.password}" url="${database.uri}" userid="${database.user}"
+         delimiter="/">
+         <classpath>
+             <fileset refid="libs"/>
+         </classpath>
+         <fileset dir="${app.build.db}">
+             <include name="*.sql"/>
+         </fileset>
+     </sql>
+  </target>
+
+    <target name="test-db" depends="init,copy-db">
+       <sql driver="${database.driver}" password="${database.password}" url="${database.uri}" userid="${database.user}"
+           delimiter="/">
+           <classpath>
+               <fileset refid="libs"/>
+           </classpath>
+           <fileset file="src/tests/resources/test.sql"/>
+       </sql>
+    </target>
+    
+  <target name="all" depends="install,install-agent,install-db"/>
+  
   <target name="post-process" depends="copy-dependent-libs,copy-etc"/>
 
   <target name="copy-www">

Modified: incubator/lokahi/lokahi/trunk/conf/db.properties
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/conf/db.properties?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/conf/db.properties (original)
+++ incubator/lokahi/lokahi/trunk/conf/db.properties Mon Oct 15 11:54:31 2007
@@ -254,7 +254,7 @@
 mysql.apache.worker.update=sp_am_update_worker
 mysql.apache.worker.delete=sp_am_drop_worker
 mysql.core.environment.by.id=SELECT e.ENV_ID, e.ENV_NAME, e.COMMENTS FROM TMC_ENV e WHERE e.ENV_ID = ?
-mysql.core.environment.by.project=SELECT unique e.env_id, e.env_name, e.comments FROM TMC_ENV e, AM_REL_ENTITY_Project ag, AM_VHOST v where ag.vhost_id = v.vhost_id and v.env_id = e.env_id and ag.project_id = ?
+mysql.core.environment.by.project=SELECT distinct e.env_id, e.env_name, e.comments FROM TMC_ENV e, AM_REL_ENTITY_Project ag, AM_VHOST v where ag.vhost_id = v.vhost_id and v.env_id = e.env_id and ag.project_id = ?
 mysql.core.environment.all=SELECT e.ENV_ID, e.ENV_NAME, e.COMMENTS FROM TMC_ENV e
 mysql.core.environment.store=sp_tmc_store_enviroment
 mysql.core.environment.update=sp_tmc_update_enviroment
@@ -263,7 +263,7 @@
 mysql.core.file.delete=sp_tmc_drop_file
 mysql.core.file.all=SELECT f.FILE_ID, f.FILE_NAME, f.FILE_DESCRIPTOR, f.FILE_PATH, f.file_content FROM TMC_FILES f
 mysql.core.function.by.id=SELECT f.FUNCTION_ID, f.FUNCTION_COMMAND, f.FUNCTION_NAME FROM TMC_FUNCTION f WHERE f.FUNCTION_ID = ?
-mysql.core.function.by.command=SELECT f.FUNCTION_COMMAND, f.FUNCTION_ID, f.FUNCTION_NAME FROM TMC_FUNCTION f WHERE f.FUNCTION_COMMAND = v_command
+mysql.core.function.by.command=SELECT f.FUNCTION_COMMAND, f.FUNCTION_ID, f.FUNCTION_NAME FROM TMC_FUNCTION f WHERE f.FUNCTION_COMMAND = ?
 mysql.core.function.all=SELECT f.FUNCTION_ID, f.FUNCTION_COMMAND, f.FUNCTION_NAME FROM TMC_FUNCTION f
 mysql.core.function.store=sp_tmc_store_function
 mysql.core.function.update=sp_tmc_update_function
@@ -288,9 +288,9 @@
 mysql.core.pool.delete=sp_tmc_drop_hostingpool
 mysql.core.pool.by.id=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND hp.HOSTING_POOL_ID=?
 mysql.core.pool.all=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID
-mysql.core.pool.by.apacheworker=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel, AM_REL_POOL_WORKER rpw Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND rel.AM_POOL_ID=rpw.POOL_ID AND rpw.WORKER_ID=v_id
+mysql.core.pool.by.apacheworker=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel, AM_REL_POOL_WORKER rpw Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND rel.AM_POOL_ID=rpw.POOL_ID AND rpw.WORKER_ID=?
 mysql.core.pool.by.name=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND lower(hp.HOSTING_POOL_name) like lower(?)
-mysql.core.pool.by.apachepool=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel, AM_REL_POOL_WORKER rpw Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND rel.AM_POOL_ID=v_id
+mysql.core.pool.by.apachepool=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel, AM_REL_POOL_WORKER rpw Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND rel.AM_POOL_ID=?
 mysql.core.instance.by.id=SELECT i.INSTANCE_NAME, i.INSTANCE_ID, i.COMMENTS FROM TMC_INSTANCE i WHERE i.INSTANCE_ID = ?
 mysql.core.instance.all=SELECT i.INSTANCE_NAME, i.INSTANCE_ID, i.COMMENTS FROM TMC_INSTANCE i
 mysql.core.instance.by.name=SELECT i.INSTANCE_NAME, i.INSTANCE_ID, i.COMMENTS FROM TMC_INSTANCE i WHERE i.INSTANCE_NAME = ?
@@ -372,7 +372,7 @@
 mysql.tomcat.worker.by.pool=SELECT * FROM (TM_WORKER_VIEW tw JOIN TM_REL_POOL_WORKER using (WORKER_ID)) WHERE POOL_ID= ?
 mysql.tomcat.worker.all=SELECT * FROM TM_WORKER_VIEW
 mysql.tomcat.worker.by.id=SELECT * FROM TM_WORKER_VIEW tw WHERE tw.WORKER_ID = ?
-mysql.tomcat.worker.by.hardware.server=SELECT * FROM TM_WORKER_VIEW tw WHERE tw.CONTAINER_ID = ? AND tw.HARDWARE_ID = v_hId
+mysql.tomcat.worker.by.hardware.server=SELECT * FROM TM_WORKER_VIEW tw WHERE tw.CONTAINER_ID = ? AND tw.HARDWARE_ID = ?
 mysql.tomcat.worker.by.hardware=SELECT * FROM TM_WORKER_VIEW tw WHERE tw.HARDWARE_ID = ?
 mysql.tomcat.worker.by.name=SELECT * FROM TM_WORKER_VIEW tw WHERE lower(hardware_name) like lower(?)
 mysql.tomcat.worker.by.name.instance=SELECT * FROM TM_WORKER_VIEW tw WHERE hardware_name like "?" and instance_id = ?
@@ -433,10 +433,10 @@
 mysql.core.job.store.finish=sp_tmc_add_job2
 mysql.core.job.update=sp_tmc_job_update
 mysql.core.file.prep.blob={call sp_tmc_prep_file_content(?,?)}
-mysql.core.job.prep.blob={call sp_TMC_prep_job(?,EMPTY_BLOB())}
+mysql.core.job.prep.blob={call sp_TMC_prep_job(?,NULL)}
 mysql.tomcat.server.by.name=SELECT * FROM TM_CONTAINER tc WHERE lower(tc.CONTAINER_NAME) like lower(?)
 mysql.core.server.by.name=SELECT h.HARDWARE_ID, h.INSTANCE_ID, h.ENV_ID, h.PHYSICAL_LOCATION, h.HARDWARE_NAME, h.STATUS_ID, h.COMMENTS, h.DEFAULT_IP_ID FROM TMC_HARDWARE h WHERE lower(h.HARDWARE_NAME) like lower(?)
 mysql.apache.server.by.name=SELECT ap.CONTAINER_ID, ap.CONTAINER_NAME, ap.LOG_LOCATION, ap.ENV_VARIBLES, ap.FORK_WAIT, ap.PIDFILE_LOCATION, ap.RESTART_COMMAND, ap.START_COMMAND, ap.STOP_COMMAND, ap.SYS_GROUP, ap.SYS_USER, ap.SERVER_ROOT, ap.MAIN_ID FROM AM_CONTAINER ap WHERE lower(ap.CONTAINER_name) like lower(?)
 mysql.tomcat.worker.by.server=SELECT * FROM TM_WORKER_VIEW tw WHERE tw.CONTAINER_ID = ?
 mysql.apache.worker.by.server=SELECT * FROM AM_WORKER_VIEW aw where aw.CONTAINER_ID=?
-mysql.core.pool.by.tomcatpool=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND rel.TM_POOL_ID=v_id
+mysql.core.pool.by.tomcatpool=SELECT hp.HOSTING_POOL_ID, hp.HOSTING_POOL_NAME, hp.ENV_ID, rel.AM_POOL_ID, rel.TM_POOL_ID FROM TMC_Hosting_Pool hp, TMC_REL_HOSTING_MODULES rel Where rel.HOSTING_POOL_ID = hp.HOSTING_POOL_ID AND rel.TM_POOL_ID=?

Modified: incubator/lokahi/lokahi/trunk/conf/log4j.xml
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/conf/log4j.xml?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/conf/log4j.xml (original)
+++ incubator/lokahi/lokahi/trunk/conf/log4j.xml Mon Oct 15 11:54:31 2007
@@ -46,6 +46,9 @@
   <category name="org.apache.lokahi.core.api.function.Function">
     <priority value="INFO"/>
   </category>
+  <category name="org.apache.lokahi.core.common.database">
+    <priority value="INFO"/>
+  </category>  
   <category name="org.apache.lokahi.dao.TMCCollectionImpl">
     <priority value="INFO"/>
   </category>

Modified: incubator/lokahi/lokahi/trunk/conf/lokahi.properties
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/conf/lokahi.properties?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/conf/lokahi.properties (original)
+++ incubator/lokahi/lokahi/trunk/conf/lokahi.properties Mon Oct 15 11:54:31 2007
@@ -53,7 +53,8 @@
 wap.function.TomcatWorker=RestartTomcat,StartTomcat,StopTomcat,DeployTomcatConfig
 
 # Generic DB support
-#lokahi.broker.implementation=org.apache.lokahi.core.common.database.MySqlBroker
-lokahi.broker.implementation=org.apache.lokahi.core.common.database.OracleBroker
+lokahi.broker.implementation=org.apache.lokahi.core.common.database.MySqlBroker
+#lokahi.broker.implementation=org.apache.lokahi.core.common.database.OracleBroker
 lokahi.broker.autocommit=true
+lokahi.broker.type=mysql
 

Modified: incubator/lokahi/lokahi/trunk/database/mysql/procs.sql
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/database/mysql/procs.sql?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/database/mysql/procs.sql (original)
+++ incubator/lokahi/lokahi/trunk/database/mysql/procs.sql Mon Oct 15 11:54:31 2007
@@ -314,13 +314,32 @@
 				     			   	 )
 
 BEGIN
-
-
 		   	INSERT INTO AM_REL_VHOST_IP (VHOST_ID, IP_ID)
 		   	VALUES ( V_VID, V_IPID);
 	  END;
 
 /
+DROP PROCEDURE IF EXISTS sp_am_store_vhost;
+/
+CREATE PROCEDURE sp_am_store_vhost
+                                   ( 
+                                    OUT v_id INT,
+                                    IN v_name  VARCHAR(100),
+                                    IN v_stateId  INT,
+                                    IN v_envId    INT,
+                                    IN v_hpId     INT,
+                                    IN v_catch    INT,
+                                    IN v_nameb    INT,
+                                    IN v_exPid    INT,
+                                    IN v_entry BLOB
+                                    )
+BEGIN
+    INSERT INTO AM_VHOST (vhost_NAME, state_id, env_id, hosting_pool_id, catchall, namebased, ex_PROJECT_ID, vhost_entry)
+    VALUES ( v_name, v_stateId, v_envId, v_hpId, v_catch, v_nameb, v_exPid, v_entry);
+    -- get the newly added id
+    SELECT LAST_INSERT_ID() INTO v_id;
+END;
+/
 DROP PROCEDURE IF EXISTS SP_AM_STORE_VHOSTS_REL_PROJECT;
 /
 CREATE PROCEDURE SP_AM_STORE_VHOSTS_REL_PROJECT
@@ -329,13 +348,12 @@
 				     			   	 )
 
 BEGIN
-
-
 		   	INSERT INTO AM_REL_ENTITY_PROJECT (VHOST_ID, PROJECT_ID)
 		   	VALUES ( V_VID, V_PID);
 	  END;
 
 /
+
 DROP PROCEDURE IF EXISTS SP_AM_STORE_WORKER_POOL;
 /
 CREATE PROCEDURE SP_AM_STORE_WORKER_POOL
@@ -344,8 +362,6 @@
 				     			   	 )
 
 BEGIN
-
-
 	INSERT INTO AM_REL_POOL_WORKER (POOL_ID, WORKER_ID)
 	VALUES (V_POOLID, V_WORKERID);
 	  END;
@@ -1218,7 +1234,7 @@
    	VALUES ( V_NAME, V_ENVID);
 	-- get the newly added id
 	SET V_SEQ = LAST_INSERT_ID();
-	INSERT INTO TMC_REL_HOSTING_MODULES (AM_POOL_ID, TM_POOL_ID)
+	INSERT INTO TMC_REL_HOSTING_MODULES (HOSTING_POOL_ID, AM_POOL_ID, TM_POOL_ID)
 	VALUES (V_SEQ, V_AMPID, V_TMPID);
 END;
 /
@@ -1937,21 +1953,34 @@
 	  END;
 
 /
+DROP PROCEDURE IF EXISTS sp_tm_store_pool;
+/
+CREATE PROCEDURE sp_tm_store_pool
+                                   ( OUT v_id INT,
+                                     IN v_name VARCHAR(40),
+                                     IN v_eId INT
+                                     )
+BEGIN
+   INSERT INTO TM_POOL (pool_name, env_Id)
+   VALUES ( v_name, v_eId);
+    SELECT LAST_INSERT_ID() INTO V_ID;
+END;
+/
 DROP PROCEDURE IF EXISTS SP_TM_STORE_TOMCAT4;
 /
 CREATE PROCEDURE SP_TM_STORE_TOMCAT4
 		  						   ( OUT V_ID INT,
 								   	 IN V_NAME VARCHAR(40),
-									 IN V_BASELOCATION VARCHAR(100),
-									 IN V_TOMCATHOME VARCHAR(100),
+									 IN V_BASELOCATION VARCHAR(4000),
+									 IN V_TOMCATHOME VARCHAR(4000),
 									 IN V_HTTPPORT INT,
 									 IN V_SYSUSER VARCHAR(8),
 									 IN V_SYSGROUP VARCHAR(8),
 									 IN V_DESCRIP VARCHAR(100),
 									 IN V_TT INT,
-									 IN V_JAVAHOME VARCHAR(40),
+									 IN V_JAVAHOME VARCHAR(300),
 									 IN V_STARTCLASS VARCHAR(40),
-									 IN V_OUTLOG VARCHAR(40),									 
+									 IN V_OUTLOG VARCHAR(300),									 
 									 IN V_ENTRY BLOB
 				     			   	 )
 BEGIN
@@ -2183,8 +2212,6 @@
 									 IN V_SID INT
 				     			   	)
 
-
-
 BEGIN
 DECLARE W_ID INT;
 DECLARE CV CURSOR FOR SELECT WORKER_ID FROM AM_WORKER WHERE
@@ -2203,5 +2230,20 @@
 	SET V_ID =  W_ID;
 	-- dbms_output.put_line('Found worker Id ' || w_id );
 	CLOSE CV;
+END;
+/
+
+-- TODO finish porting to MySQL
+/
+DROP PROCEDURE IF EXISTS sp_update_admin_jvm_role;
+/
+CREATE procedure sp_update_admin_jvm_role ( IN v_prim varchar(50),
+                                            IN v_back varchar(50),
+                                            IN v_alt varchar(50),
+                                            IN v_inst int)
+BEGIN
+    INSERT INTO tmc_admin (instance_id,primary_jvm,backup_jvm,alternate_jvm)
+    VALUES( v_inst,v_prim, v_back, v_alt)
+    ON DUPLICATE KEY UPDATE primary_jvm=v_prim,backup_jvm=v_back,alternate_jvm=v_alt;
 END;
 /

Modified: incubator/lokahi/lokahi/trunk/database/mysql/tables.sql
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/database/mysql/tables.sql?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/database/mysql/tables.sql (original)
+++ incubator/lokahi/lokahi/trunk/database/mysql/tables.sql Mon Oct 15 11:54:31 2007
@@ -15,364 +15,365 @@
 -- KIND, either express or implied.  See the License for the
 -- specific language governing permissions and limitations
 -- under the License.
---
+-- <ScriptOptions statementTerminator="/" />
+-- SQL99
 
-DROP TABLE IF EXISTS AM_CONTAINER;
-CREATE TABLE AM_CONTAINER (CONTAINER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (CONTAINER_ID),CONTAINER_NAME VARCHAR(100) NOT NULL,SERVER_ROOT VARCHAR(300) ,LOG_LOCATION VARCHAR(300) ,SYS_USER VARCHAR(8) ,SYS_GROUP VARCHAR(8) ,START_COMMAND VARCHAR(4000) ,STOP_COMMAND VARCHAR(4000) ,RESTART_COMMAND VARCHAR(4000) ,FORK_WAIT INT(11) ,PIDFILE_LOCATION VARCHAR(300) ,ENV_VARIBLES VARCHAR(4000) ,MAIN_ID INT(11) , KEY (MAIN_ID));
+DROP TABLE IF EXISTS AM_CONTAINER;/
+CREATE TABLE AM_CONTAINER (CONTAINER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (CONTAINER_ID),CONTAINER_NAME VARCHAR(100) NOT NULL,SERVER_ROOT VARCHAR(300) ,LOG_LOCATION VARCHAR(300) ,SYS_USER VARCHAR(8) ,SYS_GROUP VARCHAR(8) ,START_COMMAND VARCHAR(4000) ,STOP_COMMAND VARCHAR(4000) ,RESTART_COMMAND VARCHAR(4000) ,FORK_WAIT INT(11) ,PIDFILE_LOCATION VARCHAR(300) ,ENV_VARIBLES VARCHAR(4000) ,MAIN_ID INT(11) , KEY (MAIN_ID));/
 
+DROP TABLE IF EXISTS AM_POOL;/
+CREATE TABLE AM_POOL (POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (POOL_ID),POOL_NAME VARCHAR(40) NOT NULL,ENV_ID INT(11) NOT NULL, KEY (ENV_ID));/
 
-DROP TABLE IF EXISTS AM_POOL;
-CREATE TABLE AM_POOL (POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (POOL_ID),POOL_NAME VARCHAR(40) NOT NULL,ENV_ID INT(11) NOT NULL, KEY (ENV_ID));
 
+DROP TABLE IF EXISTS AM_REL_CONTAINER_FILE;/
+CREATE TABLE AM_REL_CONTAINER_FILE (CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID),FILE_ID INT(11) NOT NULL, KEY (FILE_ID));/
 
-DROP TABLE IF EXISTS AM_REL_CONTAINER_FILE;
-CREATE TABLE AM_REL_CONTAINER_FILE (CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID),FILE_ID INT(11) NOT NULL, KEY (FILE_ID));
 
+DROP TABLE IF EXISTS AM_REL_ENTITY_PROJECT;/
+CREATE TABLE AM_REL_ENTITY_PROJECT (PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID),VHOST_ID INT(11) NOT NULL, KEY (VHOST_ID));/
 
-DROP TABLE IF EXISTS AM_REL_ENTITY_PROJECT;
-CREATE TABLE AM_REL_ENTITY_PROJECT (PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID),VHOST_ID INT(11) NOT NULL, KEY (VHOST_ID));
 
+DROP TABLE IF EXISTS AM_REL_POOL_WORKER;/
+CREATE TABLE AM_REL_POOL_WORKER (POOL_ID INT(11) NOT NULL, KEY (POOL_ID),WORKER_ID INT(11) NOT NULL, KEY (WORKER_ID));/
 
-DROP TABLE IF EXISTS AM_REL_POOL_WORKER;
-CREATE TABLE AM_REL_POOL_WORKER (POOL_ID INT(11) NOT NULL, KEY (POOL_ID),WORKER_ID INT(11) NOT NULL, KEY (WORKER_ID));
 
+DROP TABLE IF EXISTS AM_REL_VHOST_IP;/
+CREATE TABLE AM_REL_VHOST_IP (VHOST_ID INT(11) NOT NULL, KEY (VHOST_ID),IP_ID INT(11) NOT NULL, KEY (IP_ID));/
 
-DROP TABLE IF EXISTS AM_REL_VHOST_IP;
-CREATE TABLE AM_REL_VHOST_IP (VHOST_ID INT(11) NOT NULL, KEY (VHOST_ID),IP_ID INT(11) NOT NULL, KEY (IP_ID));
 
+DROP TABLE IF EXISTS AM_VHOST;/
+CREATE TABLE AM_VHOST (VHOST_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (VHOST_ID),VHOST_ENTRY BLOB ,VHOST_NAME VARCHAR(60) NOT NULL,ENV_ID INT(11) , KEY (ENV_ID),STATE_ID INT(11) , KEY (STATE_ID),HOSTING_POOL_ID INT(11) , KEY (HOSTING_POOL_ID),NAMEBASED INT(11) DEFAULT 1,CATCHALL INT(11) DEFAULT 0,EX_PROJECT_ID INT(11) DEFAULT 0, KEY (EX_PROJECT_ID));/
 
-DROP TABLE IF EXISTS AM_VHOST;
-CREATE TABLE AM_VHOST (VHOST_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (VHOST_ID),VHOST_ENTRY BLOB ,VHOST_NAME VARCHAR(60) NOT NULL,ENV_ID INT(11) , KEY (ENV_ID),STATE_ID INT(11) , KEY (STATE_ID),HOSTING_POOL_ID INT(11) , KEY (HOSTING_POOL_ID),NAMEBASED INT(11) DEFAULT 1,CATCHALL INT(11) DEFAULT 0,EX_PROJECT_ID INT(11) DEFAULT 0, KEY (EX_PROJECT_ID));
 
+DROP TABLE IF EXISTS AM_WORKER;/
+CREATE TABLE AM_WORKER (WORKER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (WORKER_ID),STATE_ID INT(11) , KEY (STATE_ID),HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID));/
 
-DROP TABLE IF EXISTS AM_WORKER;
-CREATE TABLE AM_WORKER (WORKER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (WORKER_ID),STATE_ID INT(11) , KEY (STATE_ID),HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID));
 
+DROP TABLE IF EXISTS TMC_ADMIN;/
+CREATE TABLE TMC_ADMIN (LOCK_USERS INT(11) ,PRIMARY_JVM VARCHAR(60) ,BACKUP_JVM VARCHAR(60) ,ALTERNATE_JVM VARCHAR(2000) ,OLD_KEY VARCHAR(30) ,CURRENT_KEY VARCHAR(30) ,KEY_LAST_ROTATED DATETIME ,INSTANCE_ID INT(11) , PRIMARY KEY (INSTANCE_ID));/
 
-DROP TABLE IF EXISTS TMC_ADMIN;
-CREATE TABLE TMC_ADMIN (LOCK_USERS INT(11) ,PRIMARY_JVM VARCHAR(60) ,BACKUP_JVM VARCHAR(60) ,ALTERNATE_JVM VARCHAR(2000) ,OLD_KEY VARCHAR(30) ,CURRENT_KEY VARCHAR(30) ,KEY_LAST_ROTATED DATETIME ,INSTANCE_ID INT(11) , PRIMARY KEY (INSTANCE_ID));
 
+DROP TABLE IF EXISTS TMC_ALERTS;/
+CREATE TABLE TMC_ALERTS (ALERT_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (ALERT_ID),ALERT_CONTENTS BLOB ,SUBMISION_DATE DATETIME ,SUBMITTER_ID INT(11) NOT NULL, KEY (SUBMITTER_ID),ALERT_TITLE VARCHAR(200) ,ALERT_LINK VARCHAR(4000) );/
 
-DROP TABLE IF EXISTS TMC_ALERTS;
-CREATE TABLE TMC_ALERTS (ALERT_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (ALERT_ID),ALERT_CONTENTS BLOB ,SUBMISION_DATE DATETIME ,SUBMITTER_ID INT(11) NOT NULL, KEY (SUBMITTER_ID),ALERT_TITLE VARCHAR(200) ,ALERT_LINK VARCHAR(4000) );
 
+DROP TABLE IF EXISTS TMC_CONTROLLER;/
+CREATE TABLE TMC_CONTROLLER (INSTANCE_ID INT(11) NOT NULL, KEY (INSTANCE_ID),CONTROLLER_NAME VARCHAR(400) NOT NULL,CONTROLLER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (CONTROLLER_ID),LAST_CHECK_IN DATETIME NOT NULL);/
 
-DROP TABLE IF EXISTS TMC_CONTROLLER;
-CREATE TABLE TMC_CONTROLLER (INSTANCE_ID INT(11) NOT NULL, KEY (INSTANCE_ID),CONTROLLER_NAME VARCHAR(400) NOT NULL,CONTROLLER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (CONTROLLER_ID),LAST_CHECK_IN DATETIME NOT NULL);
 
+DROP TABLE IF EXISTS TMC_ENV;/
+CREATE TABLE TMC_ENV (ENV_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (ENV_ID),ENV_NAME VARCHAR(400) NOT NULL,COMMENTS VARCHAR(400) );/
 
-DROP TABLE IF EXISTS TMC_ENV;
-CREATE TABLE TMC_ENV (ENV_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (ENV_ID),ENV_NAME VARCHAR(400) NOT NULL,COMMENTS VARCHAR(400) );
 
+DROP TABLE IF EXISTS TMC_EX_PROJECT;/
+CREATE TABLE TMC_EX_PROJECT (EX_PROJECT_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (EX_PROJECT_ID),EX_PROJECT_NAME VARCHAR(40) NOT NULL);/
 
-DROP TABLE IF EXISTS TMC_EX_PROJECT;
-CREATE TABLE TMC_EX_PROJECT (EX_PROJECT_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (EX_PROJECT_ID),EX_PROJECT_NAME VARCHAR(40) NOT NULL);
 
+DROP TABLE IF EXISTS TMC_FILES;/
+CREATE TABLE TMC_FILES (FILE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (FILE_ID),FILE_NAME VARCHAR(100) NOT NULL,FILE_CONTENT BLOB ,FILE_DESCRIPTOR VARCHAR(100) ,FILE_PATH VARCHAR(2000) );/
 
-DROP TABLE IF EXISTS TMC_FILES;
-CREATE TABLE TMC_FILES (FILE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (FILE_ID),FILE_NAME VARCHAR(100) NOT NULL,FILE_CONTENT BLOB ,FILE_DESCRIPTOR VARCHAR(100) ,FILE_PATH VARCHAR(2000) );
 
+DROP TABLE IF EXISTS TMC_FILE_ARCHIVE;/
+CREATE TABLE TMC_FILE_ARCHIVE (JOB_ID INT(11) NOT NULL, KEY (JOB_ID),FILE_CONTENTS BLOB );/
 
-DROP TABLE IF EXISTS TMC_FILE_ARCHIVE;
-CREATE TABLE TMC_FILE_ARCHIVE (JOB_ID INT(11) NOT NULL, KEY (JOB_ID),FILE_CONTENTS BLOB );
 
+DROP TABLE IF EXISTS TMC_FUNCTION;/
+CREATE TABLE TMC_FUNCTION (FUNCTION_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (FUNCTION_ID),FUNCTION_NAME VARCHAR(50) NOT NULL,FUNCTION_COMMAND VARCHAR(50) ,MODULE_ID INT(11) , KEY (MODULE_ID));/
 
-DROP TABLE IF EXISTS TMC_FUNCTION;
-CREATE TABLE TMC_FUNCTION (FUNCTION_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (FUNCTION_ID),FUNCTION_NAME VARCHAR(50) NOT NULL,FUNCTION_COMMAND VARCHAR(50) ,MODULE_ID INT(11) , KEY (MODULE_ID));
 
+DROP TABLE IF EXISTS TMC_HARDWARE;/
+CREATE TABLE TMC_HARDWARE (HARDWARE_NAME VARCHAR(60) NOT NULL,PHYSICAL_LOCATION VARCHAR(500) ,COMMENTS VARCHAR(4000) ,HARDWARE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HARDWARE_ID),INSTANCE_ID INT(11) , KEY (INSTANCE_ID),ENV_ID INT(11) , KEY (ENV_ID),STATUS_ID INT(11) , KEY (STATUS_ID),DEFAULT_IP_ID INT(11) , KEY (DEFAULT_IP_ID));/
 
-DROP TABLE IF EXISTS TMC_HARDWARE;
-CREATE TABLE TMC_HARDWARE (HARDWARE_NAME VARCHAR(60) NOT NULL,PHYSICAL_LOCATION VARCHAR(500) ,COMMENTS VARCHAR(4000) ,HARDWARE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HARDWARE_ID),INSTANCE_ID INT(11) , KEY (INSTANCE_ID),ENV_ID INT(11) , KEY (ENV_ID),STATUS_ID INT(11) , KEY (STATUS_ID),DEFAULT_IP_ID INT(11) , KEY (DEFAULT_IP_ID));
 
+DROP TABLE IF EXISTS TMC_HARDWARE_POOL;/
+CREATE TABLE TMC_HARDWARE_POOL (HARDWARE_POOL_NAME VARCHAR(60) NOT NULL,HARDWARE_POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HARDWARE_POOL_ID));/
 
-DROP TABLE IF EXISTS TMC_HARDWARE_POOL;
-CREATE TABLE TMC_HARDWARE_POOL (HARDWARE_POOL_NAME VARCHAR(60) NOT NULL,HARDWARE_POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HARDWARE_POOL_ID));
 
+DROP TABLE IF EXISTS TMC_HELP_ITEM;/
+CREATE TABLE TMC_HELP_ITEM (HELP_ITEM_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HELP_ITEM_ID),HELP_ITEM_TITLE VARCHAR(50) NOT NULL,VALID INT(11) ,FUNCTION_ID INT(11) DEFAULT 0 NOT NULL, KEY (FUNCTION_ID),CONTENT BLOB NOT NULL,SUMMARY VARCHAR(250) NOT NULL);/
 
-DROP TABLE IF EXISTS TMC_HELP_ITEM;
-CREATE TABLE TMC_HELP_ITEM (HELP_ITEM_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HELP_ITEM_ID),HELP_ITEM_TITLE VARCHAR(50) NOT NULL,VALID INT(11) ,FUNCTION_ID INT(11) DEFAULT 0 NOT NULL, KEY (FUNCTION_ID),CONTENT BLOB NOT NULL,SUMMARY VARCHAR(250) NOT NULL);
 
+DROP TABLE IF EXISTS TMC_HOSTING_POOL;/
+CREATE TABLE TMC_HOSTING_POOL (HOSTING_POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HOSTING_POOL_ID),HOSTING_POOL_NAME VARCHAR(60) NOT NULL,ENV_ID INT(11) NOT NULL, KEY (ENV_ID));/
 
-DROP TABLE IF EXISTS TMC_HOSTING_POOL;
-CREATE TABLE TMC_HOSTING_POOL (HOSTING_POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (HOSTING_POOL_ID),HOSTING_POOL_NAME VARCHAR(60) NOT NULL,ENV_ID INT(11) NOT NULL, KEY (ENV_ID));
 
+DROP TABLE IF EXISTS TMC_INSTANCE;/
+CREATE TABLE TMC_INSTANCE (INSTANCE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (INSTANCE_ID),INSTANCE_NAME VARCHAR(100) NOT NULL,COMMENTS VARCHAR(4000) );/
 
-DROP TABLE IF EXISTS TMC_INSTANCE;
-CREATE TABLE TMC_INSTANCE (INSTANCE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (INSTANCE_ID),INSTANCE_NAME VARCHAR(100) NOT NULL,COMMENTS VARCHAR(4000) );
 
+DROP TABLE IF EXISTS TMC_IP;/
+CREATE TABLE TMC_IP (IP VARCHAR(15) NOT NULL,IP_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (IP_ID));/
 
-DROP TABLE IF EXISTS TMC_IP;
-CREATE TABLE TMC_IP (IP VARCHAR(15) NOT NULL,IP_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (IP_ID));
 
+DROP TABLE IF EXISTS TMC_JOB;/
+CREATE TABLE TMC_JOB (JOB_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (JOB_ID),POOL_ID INT(11) NOT NULL, KEY (POOL_ID),JOB_NAME VARCHAR(400) ,SERVER_ID INT(11) NOT NULL, KEY (SERVER_ID),PARENT_ID INT(11) DEFAULT -1, KEY (PARENT_ID),START_TIME DATETIME ,FINISH_TIME DATETIME ,STATE_ID INT(11) DEFAULT 0, KEY (STATE_ID),OPTIONS VARCHAR(4000) ,INSTANCE_ID INT(11) NOT NULL, KEY (INSTANCE_ID),FUNCTION_ID INT(11) NOT NULL, KEY (FUNCTION_ID),RESULT BLOB );/
 
-DROP TABLE IF EXISTS TMC_JOB;
-CREATE TABLE TMC_JOB (JOB_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (JOB_ID),POOL_ID INT(11) NOT NULL, KEY (POOL_ID),JOB_NAME VARCHAR(400) ,SERVER_ID INT(11) NOT NULL, KEY (SERVER_ID),PARENT_ID INT(11) DEFAULT -1, KEY (PARENT_ID),START_TIME DATETIME ,FINISH_TIME DATETIME ,STATE_ID INT(11) DEFAULT 0, KEY (STATE_ID),OPTIONS VARCHAR(4000) ,INSTANCE_ID INT(11) NOT NULL, KEY (INSTANCE_ID),FUNCTION_ID INT(11) NOT NULL, KEY (FUNCTION_ID),RESULT BLOB );
 
+DROP TABLE IF EXISTS TMC_JOB_POOL;/
+CREATE TABLE TMC_JOB_POOL (JOB_POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (JOB_POOL_ID),JOB_POOL_NAME VARCHAR(400) ,PROJECT_ID INT(11) DEFAULT 0, KEY (PROJECT_ID),USER_ID INT(11) DEFAULT 0, KEY (USER_ID),START_TIME DATETIME ,FINISH_TIME DATETIME ,STATE_ID INT(11) DEFAULT 0, KEY (STATE_ID),FUNCTION_ID INT(11) NOT NULL, KEY (FUNCTION_ID),OPTIONS VARCHAR(4000) );/
 
-DROP TABLE IF EXISTS TMC_JOB_POOL;
-CREATE TABLE TMC_JOB_POOL (JOB_POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (JOB_POOL_ID),JOB_POOL_NAME VARCHAR(400) ,PROJECT_ID INT(11) DEFAULT 0, KEY (PROJECT_ID),USER_ID INT(11) DEFAULT 0, KEY (USER_ID),START_TIME DATETIME ,FINISH_TIME DATETIME ,STATE_ID INT(11) DEFAULT 0, KEY (STATE_ID),FUNCTION_ID INT(11) NOT NULL, KEY (FUNCTION_ID),OPTIONS VARCHAR(4000) );
 
+DROP TABLE IF EXISTS TMC_KEYWORD;/
+CREATE TABLE TMC_KEYWORD (KEYWORD_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (KEYWORD_ID),KEYWORD_NAME VARCHAR(50) NOT NULL);/
 
-DROP TABLE IF EXISTS TMC_KEYWORD;
-CREATE TABLE TMC_KEYWORD (KEYWORD_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (KEYWORD_ID),KEYWORD_NAME VARCHAR(50) NOT NULL);
 
+DROP TABLE IF EXISTS TMC_PROJECT;/
+CREATE TABLE TMC_PROJECT (PROJECT_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (PROJECT_ID),PROJECT_NAME VARCHAR(500) NOT NULL);/
 
-DROP TABLE IF EXISTS TMC_PROJECT;
-CREATE TABLE TMC_PROJECT (PROJECT_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (PROJECT_ID),PROJECT_NAME VARCHAR(500) NOT NULL);
 
+DROP TABLE IF EXISTS TMC_REL_ALERT_PROJECT;/
+CREATE TABLE TMC_REL_ALERT_PROJECT (ALERT_ID INT(11) NOT NULL, KEY (ALERT_ID),PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_ALERT_PROJECT;
-CREATE TABLE TMC_REL_ALERT_PROJECT (ALERT_ID INT(11) NOT NULL, KEY (ALERT_ID),PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID));
 
+DROP TABLE IF EXISTS TMC_REL_FUNCTION_USER;/
+CREATE TABLE TMC_REL_FUNCTION_USER (USER_ID INT(11) NOT NULL, KEY (USER_ID),FUNCTION_ID INT(11) NOT NULL, KEY (FUNCTION_ID),OBJECT_ID INT(11) NOT NULL, KEY (OBJECT_ID),OBJECT_TYPE INT(11) NOT NULL,PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_FUNCTION_USER;
-CREATE TABLE TMC_REL_FUNCTION_USER (USER_ID INT(11) NOT NULL, KEY (USER_ID),FUNCTION_ID INT(11) NOT NULL, KEY (FUNCTION_ID),OBJECT_ID INT(11) NOT NULL, KEY (OBJECT_ID),OBJECT_TYPE INT(11) NOT NULL,PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID));
 
+DROP TABLE IF EXISTS TMC_REL_HARDWARE_FILE;/
+CREATE TABLE TMC_REL_HARDWARE_FILE (HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),FILE_ID INT(11) NOT NULL, KEY (FILE_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_HARDWARE_FILE;
-CREATE TABLE TMC_REL_HARDWARE_FILE (HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),FILE_ID INT(11) NOT NULL, KEY (FILE_ID));
 
+DROP TABLE IF EXISTS TMC_REL_HARDWARE_IP;/
+CREATE TABLE TMC_REL_HARDWARE_IP (HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),IP_ID INT(11) NOT NULL, KEY (IP_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_HARDWARE_IP;
-CREATE TABLE TMC_REL_HARDWARE_IP (HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),IP_ID INT(11) NOT NULL, KEY (IP_ID));
 
+DROP TABLE IF EXISTS TMC_REL_HARDWARE_POOL;/
+CREATE TABLE TMC_REL_HARDWARE_POOL (HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),POOL_ID INT(11) NOT NULL, KEY (POOL_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_HARDWARE_POOL;
-CREATE TABLE TMC_REL_HARDWARE_POOL (HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),POOL_ID INT(11) NOT NULL, KEY (POOL_ID));
 
+DROP TABLE IF EXISTS TMC_REL_HELP_KEYWORD;/
+CREATE TABLE TMC_REL_HELP_KEYWORD (HELP_ITEM_ID INT(11) NOT NULL, KEY (HELP_ITEM_ID),KEYWORD_ID INT(11) NOT NULL, KEY (KEYWORD_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_HELP_KEYWORD;
-CREATE TABLE TMC_REL_HELP_KEYWORD (HELP_ITEM_ID INT(11) NOT NULL, KEY (HELP_ITEM_ID),KEYWORD_ID INT(11) NOT NULL, KEY (KEYWORD_ID));
 
+DROP TABLE IF EXISTS TMC_REL_HELP_TOPIC;/
+CREATE TABLE TMC_REL_HELP_TOPIC (HELP_ITEM_ID INT(11) NOT NULL, KEY (HELP_ITEM_ID),TOPIC_ID INT(11) NOT NULL, KEY (TOPIC_ID),SUBTOPIC_ID INT(11) , KEY (SUBTOPIC_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_HELP_TOPIC;
-CREATE TABLE TMC_REL_HELP_TOPIC (HELP_ITEM_ID INT(11) NOT NULL, KEY (HELP_ITEM_ID),TOPIC_ID INT(11) NOT NULL, KEY (TOPIC_ID),SUBTOPIC_ID INT(11) , KEY (SUBTOPIC_ID));
 
+DROP TABLE IF EXISTS TMC_REL_HOSTING_MODULES;/
+CREATE TABLE TMC_REL_HOSTING_MODULES (HOSTING_POOL_ID INT(11) NOT NULL, KEY (HOSTING_POOL_ID),TM_POOL_ID INT(11) DEFAULT -1, KEY (TM_POOL_ID),AM_POOL_ID INT(11) DEFAULT -1, KEY (AM_POOL_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_HOSTING_MODULES;
-CREATE TABLE TMC_REL_HOSTING_MODULES (HOSTING_POOL_ID INT(11) NOT NULL, KEY (HOSTING_POOL_ID),TM_POOL_ID INT(11) DEFAULT -1, KEY (TM_POOL_ID),AM_POOL_ID INT(11) DEFAULT -1, KEY (AM_POOL_ID));
 
+DROP TABLE IF EXISTS TMC_REL_USER_EXPROJ;/
+CREATE TABLE TMC_REL_USER_EXPROJ (USER_ID INTEGER NOT NULL, KEY (USER_ID),EX_PROJECT_ID INTEGER NOT NULL, KEY (EX_PROJECT_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_USER_EXPROJ;
-CREATE TABLE TMC_REL_USER_EXPROJ (USER_ID INTEGER NOT NULL, KEY (USER_ID),EX_PROJECT_ID INTEGER NOT NULL, KEY (EX_PROJECT_ID));
 
+DROP TABLE IF EXISTS TMC_REL_USER_PROJECT;/
+CREATE TABLE TMC_REL_USER_PROJECT (PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID),USER_ID INT(11) NOT NULL, KEY (USER_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_USER_PROJECT;
-CREATE TABLE TMC_REL_USER_PROJECT (PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID),USER_ID INT(11) NOT NULL, KEY (USER_ID));
 
+DROP TABLE IF EXISTS TMC_REL_VHOST_CONTEXT;/
+CREATE TABLE TMC_REL_VHOST_CONTEXT (CONTEXT_ID INT(11) NOT NULL, KEY (CONTEXT_ID),VHOST_ID INT(11) NOT NULL, KEY (VHOST_ID));/
 
-DROP TABLE IF EXISTS TMC_REL_VHOST_CONTEXT;
-CREATE TABLE TMC_REL_VHOST_CONTEXT (CONTEXT_ID INT(11) NOT NULL, KEY (CONTEXT_ID),VHOST_ID INT(11) NOT NULL, KEY (VHOST_ID));
 
+DROP TABLE IF EXISTS TMC_STATE;/
+CREATE TABLE TMC_STATE (STATE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (STATE_ID),STATE_NAME VARCHAR(100) NOT NULL,STATE_COLOR VARCHAR(30) );/
 
-DROP TABLE IF EXISTS TMC_STATE;
-CREATE TABLE TMC_STATE (STATE_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (STATE_ID),STATE_NAME VARCHAR(100) NOT NULL,STATE_COLOR VARCHAR(30) );
 
+DROP TABLE IF EXISTS TMC_TEMPLATE_TABLE;/
+CREATE TABLE TMC_TEMPLATE_TABLE (TMC_INSTANCE VARCHAR(30) NOT NULL,TEMPLATE_ID INT(11) NOT NULL, KEY (TEMPLATE_ID),TEMPLATE_NAME VARCHAR(100) NOT NULL,TEMPLATE_BLOCK BLOB ,STATUS VARCHAR(15) );/
 
-DROP TABLE IF EXISTS TMC_TEMPLATE_TABLE;
-CREATE TABLE TMC_TEMPLATE_TABLE (TMC_INSTANCE VARCHAR(30) NOT NULL,TEMPLATE_ID INT(11) NOT NULL, KEY (TEMPLATE_ID),TEMPLATE_NAME VARCHAR(100) NOT NULL,TEMPLATE_BLOCK BLOB ,STATUS VARCHAR(15) );
 
+DROP TABLE IF EXISTS TMC_TIMESTAMP_TABLE;/
+CREATE TABLE TMC_TIMESTAMP_TABLE (TABLE_NAME VARCHAR(30) ,TIME_MODIFIED DATETIME ,TMC_INSTANCE VARCHAR(30) );/
 
-DROP TABLE IF EXISTS TMC_TIMESTAMP_TABLE;
-CREATE TABLE TMC_TIMESTAMP_TABLE (TABLE_NAME VARCHAR(30) ,TIME_MODIFIED DATETIME ,TMC_INSTANCE VARCHAR(30) );
 
+DROP TABLE IF EXISTS TMC_TOPIC;/
+CREATE TABLE TMC_TOPIC (TOPIC_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (TOPIC_ID),TOPIC_NAME VARCHAR(50) );/
 
-DROP TABLE IF EXISTS TMC_TOPIC;
-CREATE TABLE TMC_TOPIC (TOPIC_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (TOPIC_ID),TOPIC_NAME VARCHAR(50) );
 
+DROP TABLE IF EXISTS TMC_USER;/
+CREATE TABLE TMC_USER (FIRST_NAME VARCHAR(30) ,LAST_NAME VARCHAR(30) ,JOB_TITLE VARCHAR(100) ,COMMENTS VARCHAR(2000) ,EMAIL VARCHAR(60) ,USER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (USER_ID),USER_NAME VARCHAR(30) NOT NULL,STATE_ID INT(11) DEFAULT 8, KEY (STATE_ID),PASSWORD VARCHAR(32) );/
 
-DROP TABLE IF EXISTS TMC_USER;
-CREATE TABLE TMC_USER (FIRST_NAME VARCHAR(30) ,LAST_NAME VARCHAR(30) ,JOB_TITLE VARCHAR(100) ,COMMENTS VARCHAR(2000) ,EMAIL VARCHAR(60) ,USER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (USER_ID),USER_NAME VARCHAR(30) NOT NULL,STATE_ID INT(11) DEFAULT 8, KEY (STATE_ID),PASSWORD VARCHAR(32) );
 
+DROP TABLE IF EXISTS TM_CONTAINER;/
+CREATE TABLE TM_CONTAINER (CONTAINER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (CONTAINER_ID),CONTAINER_NAME VARCHAR(40) ,BASE_LOCATION VARCHAR(100) ,TOMCAT_HOME VARCHAR(100) ,HTTP_PORT INT(11) ,SYS_USER VARCHAR(8) ,SYS_GROUP VARCHAR(8) ,CONF_ENTRY BLOB ,TOMCAT_TYPE INT(11) DEFAULT 4,DESCRIPTION VARCHAR(100) ,STD_OUT_LOG VARCHAR(300) ,START_CLASS VARCHAR(40) ,JAVA_HOME VARCHAR(300) );/
 
-DROP TABLE IF EXISTS TM_CONTAINER;
-CREATE TABLE TM_CONTAINER (CONTAINER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (CONTAINER_ID),CONTAINER_NAME VARCHAR(40) ,BASE_LOCATION VARCHAR(100) ,TOMCAT_HOME VARCHAR(100) ,HTTP_PORT INT(11) ,SYS_USER VARCHAR(8) ,SYS_GROUP VARCHAR(8) ,CONF_ENTRY BLOB ,TOMCAT_TYPE INT(11) DEFAULT 4,DESCRIPTION VARCHAR(100) ,STD_OUT_LOG VARCHAR(40) ,START_CLASS VARCHAR(40) ,JAVA_HOME VARCHAR(40) );
 
+DROP TABLE IF EXISTS TM_ENTITY;/
+CREATE TABLE TM_ENTITY (ENTITY_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (ENTITY_ID),ENTITY_NAME VARCHAR(60) NOT NULL,DOC_BASE VARCHAR(500) NOT NULL,ENTITY_STATE_ID INT(11) NOT NULL, KEY (ENTITY_STATE_ID),ENV_ID INT(11) NOT NULL, KEY (ENV_ID),TOMCAT_POOL_ID INT(11) , KEY (TOMCAT_POOL_ID),ENTITY_DEFIN VARCHAR(4000) ,EX_PROJECT_ID INT(11) DEFAULT 0, KEY (EX_PROJECT_ID));/
 
-DROP TABLE IF EXISTS TM_ENTITY;
-CREATE TABLE TM_ENTITY (ENTITY_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (ENTITY_ID),ENTITY_NAME VARCHAR(60) NOT NULL,DOC_BASE VARCHAR(500) NOT NULL,ENTITY_STATE_ID INT(11) NOT NULL, KEY (ENTITY_STATE_ID),ENV_ID INT(11) NOT NULL, KEY (ENV_ID),TOMCAT_POOL_ID INT(11) , KEY (TOMCAT_POOL_ID),ENTITY_DEFIN VARCHAR(4000) ,EX_PROJECT_ID INT(11) DEFAULT 0, KEY (EX_PROJECT_ID));
 
+DROP TABLE IF EXISTS TM_POOL;/
+CREATE TABLE TM_POOL (POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (POOL_ID),POOL_NAME VARCHAR(40) NOT NULL,ENV_ID INT(11) NOT NULL, KEY (ENV_ID));/
 
-DROP TABLE IF EXISTS TM_POOL;
-CREATE TABLE TM_POOL (POOL_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (POOL_ID),POOL_NAME VARCHAR(40) NOT NULL,ENV_ID INT(11) NOT NULL, KEY (ENV_ID));
 
+DROP TABLE IF EXISTS TM_REL_CONTAINER_FILE;/
+CREATE TABLE TM_REL_CONTAINER_FILE (CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID),FILE_ID INT(11) NOT NULL, KEY (FILE_ID));/
 
-DROP TABLE IF EXISTS TM_REL_CONTAINER_FILE;
-CREATE TABLE TM_REL_CONTAINER_FILE (CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID),FILE_ID INT(11) NOT NULL, KEY (FILE_ID));
 
+DROP TABLE IF EXISTS TM_REL_ENTITY_PROJECT;/
+CREATE TABLE TM_REL_ENTITY_PROJECT (PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID),ENTITY_ID INT(11) NOT NULL, KEY (ENTITY_ID));/
 
-DROP TABLE IF EXISTS TM_REL_ENTITY_PROJECT;
-CREATE TABLE TM_REL_ENTITY_PROJECT (PROJECT_ID INT(11) NOT NULL, KEY (PROJECT_ID),ENTITY_ID INT(11) NOT NULL, KEY (ENTITY_ID));
 
+DROP TABLE IF EXISTS TM_REL_POOL_WORKER;/
+CREATE TABLE TM_REL_POOL_WORKER (POOL_ID INT(11) NOT NULL, KEY (POOL_ID),WORKER_ID INT(11) NOT NULL, KEY (WORKER_ID));/
 
-DROP TABLE IF EXISTS TM_REL_POOL_WORKER;
-CREATE TABLE TM_REL_POOL_WORKER (POOL_ID INT(11) NOT NULL, KEY (POOL_ID),WORKER_ID INT(11) NOT NULL, KEY (WORKER_ID));
 
+DROP TABLE IF EXISTS TM_WORKER;/
+CREATE TABLE TM_WORKER (WORKER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (WORKER_ID),CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID),HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),STATE_ID INT(11) , KEY (STATE_ID));/
 
-DROP TABLE IF EXISTS TM_WORKER;
-CREATE TABLE TM_WORKER (WORKER_ID INT(11) NOT NULL auto_increment, PRIMARY KEY (WORKER_ID),CONTAINER_ID INT(11) NOT NULL, KEY (CONTAINER_ID),HARDWARE_ID INT(11) NOT NULL, KEY (HARDWARE_ID),STATE_ID INT(11) , KEY (STATE_ID));
 
+CREATE UNIQUE INDEX AM_VHOSTID_PK ON AM_VHOST (VHOST_ID)  ;/
 
-CREATE UNIQUE INDEX AM_VHOSTID_PK ON AM_VHOST (VHOST_ID)  ;
 
+CREATE INDEX FK_FUNCTION_ID ON TMC_HELP_ITEM (FUNCTION_ID)  ;/
 
-CREATE INDEX FK_FUNCTION_ID ON TMC_HELP_ITEM (FUNCTION_ID)  ;
 
+CREATE INDEX FK_SUBTOPIC_ID ON TMC_REL_HELP_TOPIC (SUBTOPIC_ID)  ;/
 
-CREATE INDEX FK_SUBTOPIC_ID ON TMC_REL_HELP_TOPIC (SUBTOPIC_ID)  ;
 
+CREATE INDEX FK_TOPIC_ID ON TMC_REL_HELP_TOPIC (TOPIC_ID)  ;/
 
-CREATE INDEX FK_TOPIC_ID ON TMC_REL_HELP_TOPIC (TOPIC_ID)  ;
 
+CREATE UNIQUE INDEX PK_AM_CONTAINER ON AM_CONTAINER (CONTAINER_ID)  ;/
 
-CREATE UNIQUE INDEX PK_AM_CONTAINER ON AM_CONTAINER (CONTAINER_ID)  ;
 
+CREATE UNIQUE INDEX PK_AM_POOL ON AM_POOL (POOL_ID)  ;/
 
-CREATE UNIQUE INDEX PK_AM_POOL ON AM_POOL (POOL_ID)  ;
 
+CREATE UNIQUE INDEX PK_AM_WORKER ON AM_WORKER (WORKER_ID)  ;/
 
-CREATE UNIQUE INDEX PK_AM_WORKER ON AM_WORKER (WORKER_ID)  ;
 
+CREATE UNIQUE INDEX PK_FILE_ID ON TMC_FILES (FILE_ID)  ;/
 
-CREATE UNIQUE INDEX PK_FILE_ID ON TMC_FILES (FILE_ID)  ;
 
+CREATE UNIQUE INDEX PK_PROJECT ON TMC_PROJECT (PROJECT_ID)  ;/
 
-CREATE UNIQUE INDEX PK_PROJECT ON TMC_PROJECT (PROJECT_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_ALERTS ON TMC_ALERTS (ALERT_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_ALERTS ON TMC_ALERTS (ALERT_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_CONTROLLER ON TMC_CONTROLLER (CONTROLLER_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_CONTROLLER ON TMC_CONTROLLER (CONTROLLER_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_ENV ON TMC_ENV (ENV_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_ENV ON TMC_ENV (ENV_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_EX_PROJECT ON TMC_EX_PROJECT (EX_PROJECT_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_EX_PROJECT ON TMC_EX_PROJECT (EX_PROJECT_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_HELP_ITEM ON TMC_HELP_ITEM (HELP_ITEM_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_HELP_ITEM ON TMC_HELP_ITEM (HELP_ITEM_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_HOSTING_POOL ON TMC_HOSTING_POOL (HOSTING_POOL_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_HOSTING_POOL ON TMC_HOSTING_POOL (HOSTING_POOL_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_INSTANCE ON TMC_INSTANCE (INSTANCE_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_INSTANCE ON TMC_INSTANCE (INSTANCE_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_IP ON TMC_IP (IP_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_IP ON TMC_IP (IP_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_JOB ON TMC_JOB (JOB_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_JOB ON TMC_JOB (JOB_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_JOB_POOL ON TMC_JOB_POOL (JOB_POOL_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_JOB_POOL ON TMC_JOB_POOL (JOB_POOL_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_KEYWORD ON TMC_KEYWORD (KEYWORD_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_KEYWORD ON TMC_KEYWORD (KEYWORD_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_REL_HELP_KEYWORD ON TMC_REL_HELP_KEYWORD (HELP_ITEM_ID, KEYWORD_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_REL_HELP_KEYWORD ON TMC_REL_HELP_KEYWORD (HELP_ITEM_ID, KEYWORD_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_STATE ON TMC_STATE (STATE_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_STATE ON TMC_STATE (STATE_ID)  ;
 
+CREATE UNIQUE INDEX PK_TMC_TOPIC ON TMC_TOPIC (TOPIC_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TMC_TOPIC ON TMC_TOPIC (TOPIC_ID)  ;
 
+CREATE UNIQUE INDEX PK_TM_CONTAINER ON TM_CONTAINER (CONTAINER_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TM_CONTAINER ON TM_CONTAINER (CONTAINER_ID)  ;
 
+CREATE UNIQUE INDEX PK_TM_POOL ON TM_POOL (POOL_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TM_POOL ON TM_POOL (POOL_ID)  ;
 
+CREATE UNIQUE INDEX PK_TM_WORKER ON TM_WORKER (WORKER_ID)  ;/
 
-CREATE UNIQUE INDEX PK_TM_WORKER ON TM_WORKER (WORKER_ID)  ;
 
+CREATE UNIQUE INDEX PK_USERID ON TMC_USER (USER_ID)  ;/
 
-CREATE UNIQUE INDEX PK_USERID ON TMC_USER (USER_ID)  ;
 
+CREATE UNIQUE INDEX TMC_SERVERID_PK ON TMC_HARDWARE (HARDWARE_ID)  ;/
 
-CREATE UNIQUE INDEX TMC_SERVERID_PK ON TMC_HARDWARE (HARDWARE_ID)  ;
 
+CREATE UNIQUE INDEX TMC_TEMPLATE_TABLE_ID ON TMC_TEMPLATE_TABLE (TEMPLATE_ID)  ;/
 
-CREATE UNIQUE INDEX TMC_TEMPLATE_TABLE_ID ON TMC_TEMPLATE_TABLE (TEMPLATE_ID)  ;
 
+CREATE UNIQUE INDEX TM_CONTEXT_TABLE_CTXTID ON TM_ENTITY (ENTITY_ID)  ;/
 
-CREATE UNIQUE INDEX TM_CONTEXT_TABLE_CTXTID ON TM_ENTITY (ENTITY_ID)  ;
 
+CREATE UNIQUE INDEX UNQ_TIMESTAMP_TABLE ON TMC_TIMESTAMP_TABLE (TMC_INSTANCE, TABLE_NAME)  ;/
 
-CREATE UNIQUE INDEX UNQ_TIMESTAMP_TABLE ON TMC_TIMESTAMP_TABLE (TMC_INSTANCE, TABLE_NAME)  ;
 
+#ALTER TABLE AM_CONTAINER ADD (  CONSTRAINT PK_AM_CONTAINER PRIMARY KEY (CONTAINER_ID));/
 
-#ALTER TABLE AM_CONTAINER ADD (  CONSTRAINT PK_AM_CONTAINER PRIMARY KEY (CONTAINER_ID));
+#ALTER TABLE AM_POOL ADD (  CONSTRAINT PK_AM_POOL PRIMARY KEY (POOL_ID));/
 
-#ALTER TABLE AM_POOL ADD (  CONSTRAINT PK_AM_POOL PRIMARY KEY (POOL_ID));
+#ALTER TABLE AM_VHOST ADD (  CONSTRAINT AM_VHOSTID_PK PRIMARY KEY (VHOST_ID));/
 
-#ALTER TABLE AM_VHOST ADD (  CONSTRAINT AM_VHOSTID_PK PRIMARY KEY (VHOST_ID));
+#ALTER TABLE AM_WORKER ADD (  CONSTRAINT PK_AM_WORKER PRIMARY KEY (WORKER_ID));/
 
-#ALTER TABLE AM_WORKER ADD (  CONSTRAINT PK_AM_WORKER PRIMARY KEY (WORKER_ID));
+#ALTER TABLE TMC_ALERTS ADD (  CONSTRAINT PK_TMC_ALERTS PRIMARY KEY (ALERT_ID));/
 
-#ALTER TABLE TMC_ALERTS ADD (  CONSTRAINT PK_TMC_ALERTS PRIMARY KEY (ALERT_ID));
+#ALTER TABLE TMC_CONTROLLER ADD (  CONSTRAINT PK_TMC_CONTROLLER PRIMARY KEY (CONTROLLER_ID));/
 
-#ALTER TABLE TMC_CONTROLLER ADD (  CONSTRAINT PK_TMC_CONTROLLER PRIMARY KEY (CONTROLLER_ID));
+#ALTER TABLE TMC_ENV ADD (  CONSTRAINT PK_TMC_ENV PRIMARY KEY (ENV_ID));/
 
-#ALTER TABLE TMC_ENV ADD (  CONSTRAINT PK_TMC_ENV PRIMARY KEY (ENV_ID));
+#ALTER TABLE TMC_EX_PROJECT ADD (  CONSTRAINT PK_TMC_EX_PROJECT PRIMARY KEY (EX_PROJECT_ID),  UNIQUE (EX_PROJECT_NAME));/
 
-#ALTER TABLE TMC_EX_PROJECT ADD (  CONSTRAINT PK_TMC_EX_PROJECT PRIMARY KEY (EX_PROJECT_ID),  UNIQUE (EX_PROJECT_NAME));
+#ALTER TABLE TMC_FILES ADD (  CONSTRAINT PK_FILE_ID PRIMARY KEY (FILE_ID));/
 
-#ALTER TABLE TMC_FILES ADD (  CONSTRAINT PK_FILE_ID PRIMARY KEY (FILE_ID));
+#ALTER TABLE TMC_FUNCTION ADD (  PRIMARY KEY (FUNCTION_ID));/
 
-#ALTER TABLE TMC_FUNCTION ADD (  PRIMARY KEY (FUNCTION_ID));
+#ALTER TABLE TMC_HARDWARE ADD (  CONSTRAINT TMC_SERVERID_PK PRIMARY KEY (HARDWARE_ID));/
 
-#ALTER TABLE TMC_HARDWARE ADD (  CONSTRAINT TMC_SERVERID_PK PRIMARY KEY (HARDWARE_ID));
+#ALTER TABLE TMC_HARDWARE_POOL ADD (  PRIMARY KEY (HARDWARE_POOL_ID));/
 
-#ALTER TABLE TMC_HARDWARE_POOL ADD (  PRIMARY KEY (HARDWARE_POOL_ID));
+#ALTER TABLE TMC_HELP_ITEM ADD (  CONSTRAINT PK_TMC_HELP_ITEM PRIMARY KEY (HELP_ITEM_ID),  UNIQUE (HELP_ITEM_TITLE));/
 
-#ALTER TABLE TMC_HELP_ITEM ADD (  CONSTRAINT PK_TMC_HELP_ITEM PRIMARY KEY (HELP_ITEM_ID),  UNIQUE (HELP_ITEM_TITLE));
+#ALTER TABLE TMC_HOSTING_POOL ADD (  CONSTRAINT PK_TMC_HOSTING_POOL PRIMARY KEY (HOSTING_POOL_ID));/
 
-#ALTER TABLE TMC_HOSTING_POOL ADD (  CONSTRAINT PK_TMC_HOSTING_POOL PRIMARY KEY (HOSTING_POOL_ID));
+#ALTER TABLE TMC_INSTANCE ADD (  CONSTRAINT PK_TMC_INSTANCE PRIMARY KEY (INSTANCE_ID));/
 
-#ALTER TABLE TMC_INSTANCE ADD (  CONSTRAINT PK_TMC_INSTANCE PRIMARY KEY (INSTANCE_ID));
+#ALTER TABLE TMC_IP ADD (  CONSTRAINT PK_TMC_IP PRIMARY KEY (IP_ID));/
 
-#ALTER TABLE TMC_IP ADD (  CONSTRAINT PK_TMC_IP PRIMARY KEY (IP_ID));
+#ALTER TABLE TMC_JOB ADD (  CONSTRAINT PK_TMC_JOB PRIMARY KEY (JOB_ID));/
 
-#ALTER TABLE TMC_JOB ADD (  CONSTRAINT PK_TMC_JOB PRIMARY KEY (JOB_ID));
+#ALTER TABLE TMC_JOB_POOL ADD (  CONSTRAINT PK_TMC_JOB_POOL PRIMARY KEY (JOB_POOL_ID));/
 
-#ALTER TABLE TMC_JOB_POOL ADD (  CONSTRAINT PK_TMC_JOB_POOL PRIMARY KEY (JOB_POOL_ID));
+#ALTER TABLE TMC_KEYWORD ADD (  CONSTRAINT PK_TMC_KEYWORD PRIMARY KEY (KEYWORD_ID),  UNIQUE (KEYWORD_NAME));/
 
-#ALTER TABLE TMC_KEYWORD ADD (  CONSTRAINT PK_TMC_KEYWORD PRIMARY KEY (KEYWORD_ID),  UNIQUE (KEYWORD_NAME));
+#ALTER TABLE TMC_PROJECT ADD (  CONSTRAINT PK_PROJECT PRIMARY KEY (PROJECT_ID));/
 
-#ALTER TABLE TMC_PROJECT ADD (  CONSTRAINT PK_PROJECT PRIMARY KEY (PROJECT_ID));
+#ALTER TABLE TMC_REL_HELP_KEYWORD ADD (  CONSTRAINT PK_TMC_REL_HELP_KEYWORD PRIMARY KEY (HELP_ITEM_ID, KEYWORD_ID));/
 
-#ALTER TABLE TMC_REL_HELP_KEYWORD ADD (  CONSTRAINT PK_TMC_REL_HELP_KEYWORD PRIMARY KEY (HELP_ITEM_ID, KEYWORD_ID));
+#ALTER TABLE TMC_REL_HELP_TOPIC ADD (  UNIQUE (HELP_ITEM_ID));/
 
-#ALTER TABLE TMC_REL_HELP_TOPIC ADD (  UNIQUE (HELP_ITEM_ID));
+#ALTER TABLE TMC_STATE ADD (  CONSTRAINT PK_TMC_STATE PRIMARY KEY (STATE_ID));/
 
-#ALTER TABLE TMC_STATE ADD (  CONSTRAINT PK_TMC_STATE PRIMARY KEY (STATE_ID));
+#ALTER TABLE TMC_TEMPLATE_TABLE ADD (  CONSTRAINT TMC_TEMPLATE_TABLE_ID PRIMARY KEY (TEMPLATE_ID));/
 
-#ALTER TABLE TMC_TEMPLATE_TABLE ADD (  CONSTRAINT TMC_TEMPLATE_TABLE_ID PRIMARY KEY (TEMPLATE_ID));
+#ALTER TABLE TMC_TIMESTAMP_TABLE ADD (  CONSTRAINT UNQ_TIMESTAMP_TABLE UNIQUE (TMC_INSTANCE, TABLE_NAME));/
 
-#ALTER TABLE TMC_TIMESTAMP_TABLE ADD (  CONSTRAINT UNQ_TIMESTAMP_TABLE UNIQUE (TMC_INSTANCE, TABLE_NAME));
+#ALTER TABLE TMC_TOPIC ADD (  CONSTRAINT PK_TMC_TOPIC PRIMARY KEY (TOPIC_ID),  UNIQUE (TOPIC_NAME));/
 
-#ALTER TABLE TMC_TOPIC ADD (  CONSTRAINT PK_TMC_TOPIC PRIMARY KEY (TOPIC_ID),  UNIQUE (TOPIC_NAME));
+#ALTER TABLE TMC_USER ADD (  CONSTRAINT PK_USERID PRIMARY KEY (USER_ID),  UNIQUE (USER_NAME));/
 
-#ALTER TABLE TMC_USER ADD (  CONSTRAINT PK_USERID PRIMARY KEY (USER_ID),  UNIQUE (USER_NAME));
+#ALTER TABLE TM_CONTAINER ADD (  CONSTRAINT PK_TM_CONTAINER PRIMARY KEY (CONTAINER_ID));/
 
-#ALTER TABLE TM_CONTAINER ADD (  CONSTRAINT PK_TM_CONTAINER PRIMARY KEY (CONTAINER_ID));
+#ALTER TABLE TM_ENTITY ADD (  CONSTRAINT TM_CONTEXT_TABLE_CTXTID PRIMARY KEY (ENTITY_ID));/
 
-#ALTER TABLE TM_ENTITY ADD (  CONSTRAINT TM_CONTEXT_TABLE_CTXTID PRIMARY KEY (ENTITY_ID));
+#ALTER TABLE TM_POOL ADD (  CONSTRAINT PK_TM_POOL PRIMARY KEY (POOL_ID),  UNIQUE (POOL_NAME));/
 
-#ALTER TABLE TM_POOL ADD (  CONSTRAINT PK_TM_POOL PRIMARY KEY (POOL_ID),  UNIQUE (POOL_NAME));
+#ALTER TABLE TM_WORKER ADD (  CONSTRAINT PK_TM_WORKER PRIMARY KEY (WORKER_ID));/
 
-#ALTER TABLE TM_WORKER ADD (  CONSTRAINT PK_TM_WORKER PRIMARY KEY (WORKER_ID));
+#ALTER TABLE AM_REL_CONTAINER_FILE ADD (  CONSTRAINT CONT_ID_REL FOREIGN KEY (CONTAINER_ID) REFERENCES AM_CONTAINER (CONTAINER_ID) ON DELETE CASCADE);/
 
-#ALTER TABLE AM_REL_CONTAINER_FILE ADD (  CONSTRAINT CONT_ID_REL FOREIGN KEY (CONTAINER_ID) REFERENCES AM_CONTAINER (CONTAINER_ID) ON DELETE CASCADE);
+#ALTER TABLE AM_REL_ENTITY_PROJECT ADD (  CONSTRAINT PROJECT_ID_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES TMC_PROJECT (PROJECT_ID) ON DELETE CASCADE DISABLE,  CONSTRAINT VHOST_ID_FK FOREIGN KEY (VHOST_ID) REFERENCES AM_VHOST (VHOST_ID) ON DELETE CASCADE DISABLE);/
 
-#ALTER TABLE AM_REL_ENTITY_PROJECT ADD (  CONSTRAINT PROJECT_ID_FK2 FOREIGN KEY (PROJECT_ID) REFERENCES TMC_PROJECT (PROJECT_ID) ON DELETE CASCADE DISABLE,  CONSTRAINT VHOST_ID_FK FOREIGN KEY (VHOST_ID) REFERENCES AM_VHOST (VHOST_ID) ON DELETE CASCADE DISABLE);
+#ALTER TABLE TMC_REL_HELP_TOPIC ADD (  CONSTRAINT FK_REL_HELP_ITEM_ID FOREIGN KEY (HELP_ITEM_ID) REFERENCES TMC_HELP_ITEM (HELP_ITEM_ID) ON DELETE CASCADE,  CONSTRAINT FK_SUBTOPIC_ID FOREIGN KEY (SUBTOPIC_ID) REFERENCES TMC_TOPIC (TOPIC_ID) ON DELETE CASCADE,  CONSTRAINT FK_TOPIC_ID FOREIGN KEY (TOPIC_ID) REFERENCES TMC_TOPIC (TOPIC_ID) ON DELETE CASCADE);/
 
-#ALTER TABLE TMC_REL_HELP_TOPIC ADD (  CONSTRAINT FK_REL_HELP_ITEM_ID FOREIGN KEY (HELP_ITEM_ID) REFERENCES TMC_HELP_ITEM (HELP_ITEM_ID) ON DELETE CASCADE,  CONSTRAINT FK_SUBTOPIC_ID FOREIGN KEY (SUBTOPIC_ID) REFERENCES TMC_TOPIC (TOPIC_ID) ON DELETE CASCADE,  CONSTRAINT FK_TOPIC_ID FOREIGN KEY (TOPIC_ID) REFERENCES TMC_TOPIC (TOPIC_ID) ON DELETE CASCADE);
+#ALTER TABLE TM_REL_ENTITY_PROJECT ADD (  CONSTRAINT ENTITY_ID_FK FOREIGN KEY (ENTITY_ID) REFERENCES TM_ENTITY (ENTITY_ID) ON DELETE CASCADE DISABLE,  CONSTRAINT PROJECT_ID_FK FOREIGN KEY (PROJECT_ID) REFERENCES TMC_PROJECT (PROJECT_ID) ON DELETE CASCADE DISABLE);/
 
-#ALTER TABLE TM_REL_ENTITY_PROJECT ADD (  CONSTRAINT ENTITY_ID_FK FOREIGN KEY (ENTITY_ID) REFERENCES TM_ENTITY (ENTITY_ID) ON DELETE CASCADE DISABLE,  CONSTRAINT PROJECT_ID_FK FOREIGN KEY (PROJECT_ID) REFERENCES TMC_PROJECT (PROJECT_ID) ON DELETE CASCADE DISABLE);
 

Modified: incubator/lokahi/lokahi/trunk/database/mysql/tmc_rel_function_user_data.sql
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/database/mysql/tmc_rel_function_user_data.sql?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/database/mysql/tmc_rel_function_user_data.sql (original)
+++ incubator/lokahi/lokahi/trunk/database/mysql/tmc_rel_function_user_data.sql Mon Oct 15 11:54:31 2007
@@ -18,131 +18,132 @@
 --
 -- initial data for superuser USER_ID=1
 -- automatically generated by script
-insert into TMC_REL_FUNCTION_USER values ( 1,1,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,2,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,8,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,123,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,64,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,38,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,61,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,120,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,97,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,69,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,29,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,87,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,36,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,32,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,28,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,74,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,90,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,119,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,18,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,34,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,10,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,3,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,76,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,77,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,78,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,79,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,80,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,81,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,82,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,84,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,85,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,127,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,128,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,129,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,130,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,131,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,132,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,133,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,134,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,135,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,121,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,125,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,48,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,37,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,107,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,47,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,4,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,58,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,91,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,99,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,19,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,100,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,45,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,50,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,83,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,96,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,63,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,94,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,49,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,105,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,31,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,115,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,102,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,7,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,62,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,68,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,112,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,109,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,15,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,17,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,25,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,30,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,59,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,65,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,86,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,9,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,11,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,14,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,95,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,101,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,46,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,33,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,21,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,44,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,108,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,110,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,104,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,22,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,56,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,5,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,98,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,26,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,75,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,92,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,35,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,51,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,126,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,60,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,6,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,13,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,12,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,16,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,20,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,103,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,111,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,27,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,118,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,88,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,23,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,117,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,136,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,42,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,39,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,67,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,89,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,41,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,106,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,66,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,24,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,57,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,116,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,114,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,93,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,73,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,43,0,1,0 );
-insert into TMC_REL_FUNCTION_USER values ( 1,40,0,1,0 );
+insert into TMC_REL_FUNCTION_USER values ( 1,1,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,2,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,8,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,123,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,64,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,38,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,61,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,120,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,97,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,69,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,29,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,87,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,36,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,32,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,28,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,74,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,90,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,119,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,18,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,34,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,10,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,3,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,76,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,77,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,78,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,79,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,80,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,81,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,82,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,84,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,85,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,127,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,128,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,129,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,130,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,131,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,132,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,133,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,134,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,135,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,121,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,125,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,48,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,37,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,107,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,47,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,4,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,58,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,91,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,99,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,19,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,100,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,45,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,50,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,83,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,96,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,63,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,94,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,49,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,105,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,31,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,115,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,102,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,7,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,62,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,68,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,112,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,109,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,15,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,17,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,25,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,30,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,59,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,65,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,86,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,9,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,11,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,14,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,95,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,101,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,46,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,33,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,21,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,44,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,108,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,110,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,104,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,22,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,56,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,5,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,98,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,26,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,75,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,92,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,35,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,51,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,126,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,60,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,6,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,13,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,12,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,16,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,20,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,103,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,111,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,27,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,118,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,88,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,23,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,117,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,136,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,42,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,39,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,67,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,89,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,41,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,106,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,66,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,24,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,57,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,116,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,114,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,93,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,73,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,43,0,1,0 );/
+insert into TMC_REL_FUNCTION_USER values ( 1,40,0,1,0 );/
+
 
 

Modified: incubator/lokahi/lokahi/trunk/database/mysql/views.sql
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/database/mysql/views.sql?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/database/mysql/views.sql (original)
+++ incubator/lokahi/lokahi/trunk/database/mysql/views.sql Mon Oct 15 11:54:31 2007
@@ -17,7 +17,7 @@
 -- under the License.
 --
 
-CREATE OR REPLACE VIEW AM_ENTITY_VIE
+CREATE OR REPLACE VIEW AM_ENTITY_VIEW
 (VHOST_ID, ENV_ID, STATE_ID, VHOST_NAME, VHOST_ENTRY, 
  HOSTING_POOL_ID, NAMEBASED, CATCHALL, EX_PROJECT_ID, POOL_ID, 
  POOL_NAME, POOL_ENV_ID)
@@ -25,10 +25,10 @@
 SELECT vh.VHOST_ID, vh.ENV_ID, vh.STATE_ID, vh.VHOST_NAME, vh.VHOST_ENTRY, vh.HOSTING_POOL_ID, vh.NAMEBASED, vh.CATCHALL,  vh.EX_PROJECT_ID, p.POOL_ID, p.POOL_NAME, p.ENV_ID as POOL_ENV_ID
 FROM AM_VHOST vh, TMC_REL_HOSTING_MODULES rel, am_POOL p
 where vh.hosting_POOL_ID=rel.HOSTING_POOL_ID
-AND   p.POOL_ID=rel.AM_POOL_ID;
+AND   p.POOL_ID=rel.AM_POOL_ID;/
 
 
-CREATE OR REPLACE VIEW AM_WORKER_VIE
+CREATE OR REPLACE VIEW AM_WORKER_VIEW
 (WORKER_ID, CONTAINER_ID, STATE_ID, HARDWARE_ID, CONTAINER_NAME, 
  SERVER_ROOT, LOG_LOCATION, SYS_USER, SYS_GROUP, START_COMMAND, 
  STOP_COMMAND, RESTART_COMMAND, FORK_WAIT, PIDFILE_LOCATION, ENV_VARIBLES, 
@@ -60,10 +60,10 @@
   h.status_id as hardware_state_id,
   h.default_ip_id
 FROM
-  ((AM_WORKER w join AM_Container c using (container_ID)) JOIN TMC_HARDWARE h using (HARDWARE_ID));
+  ((AM_WORKER w join AM_Container c using (container_ID)) JOIN TMC_HARDWARE h using (HARDWARE_ID));/
 
 
-CREATE OR REPLACE VIEW TM_ENTITY_VIE
+CREATE OR REPLACE VIEW TM_ENTITY_VIEW
 (ENTITY_ID, ENTITY_NAME, DOC_BASE, ENTITY_STATE_ID, ENV_ID, 
  TOMCAT_POOL_ID, ENTITY_DEFIN, POOL_NAME, EX_PROJECT_ID, POOL_ENV_ID)
 AS 
@@ -79,10 +79,10 @@
   EX_PROJECT_ID,
   p.env_id as pool_env_id
 FROM
-  TM_ENTITY e JOIN TM_POOL p on e.TOMCAT_POOL_ID = p.POOL_ID;
+  TM_ENTITY e JOIN TM_POOL p on e.TOMCAT_POOL_ID = p.POOL_ID;/
 
 
-CREATE OR REPLACE VIEW TM_WORKER_VIE
+CREATE OR REPLACE VIEW TM_WORKER_VIEW
 (WORKER_ID, CONTAINER_ID, STATE_ID, HARDWARE_ID, CONTAINER_NAME, 
  BASE_LOCATION, TOMCAT_HOME, HTTP_PORT, SYS_USER, SYS_GROUP, 
  TOMCAT_TYPE, DESCRIPTION, CONF_ENTRY, STD_OUT_LOG, JAVA_HOME, 
@@ -114,6 +114,7 @@
   h.status_id,
   h.default_ip_id
 FROM
-  ((TM_WORKER w join TM_Container c using (container_ID)) JOIN TMC_HARDWARE h using (HARDWARE_ID));
+  ((TM_WORKER w join TM_Container c using (container_ID)) JOIN TMC_HARDWARE h using (HARDWARE_ID));/
+
 
 

Modified: incubator/lokahi/lokahi/trunk/database/oracle/tables.sql
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/database/oracle/tables.sql?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/database/oracle/tables.sql (original)
+++ incubator/lokahi/lokahi/trunk/database/oracle/tables.sql Mon Oct 15 11:54:31 2007
@@ -143,7 +143,7 @@
 CREATE TABLE TMC_USER ( FIRST_NAME VARCHAR2(30), LAST_NAME VARCHAR2(30), JOB_TITLE VARCHAR2(100), COMMENTS VARCHAR2(2000), EMAIL VARCHAR2(60), USER_ID NUMBER NOT NULL, USER_NAME VARCHAR2(30) NOT NULL, STATE_ID NUMBER DEFAULT 8, PASSWORD VARCHAR2(32) ) LOGGING NOCACHE NOPARALLEL;
 
 
-CREATE TABLE TM_CONTAINER ( CONTAINER_ID NUMBER NOT NULL, CONTAINER_NAME VARCHAR2(40), BASE_LOCATION VARCHAR2(100), TOMCAT_HOME VARCHAR2(100), HTTP_PORT NUMBER, SYS_USER VARCHAR2(8), SYS_GROUP VARCHAR2(8), CONF_ENTRY BLOB, TOMCAT_TYPE NUMBER DEFAULT 4, DESCRIPTION VARCHAR2(100), STD_OUT_LOG VARCHAR2(300), START_CLASS VARCHAR2(40), JAVA_HOME VARCHAR2(40) ) LOGGING NOCACHE NOPARALLEL;
+CREATE TABLE TM_CONTAINER ( CONTAINER_ID NUMBER NOT NULL, CONTAINER_NAME VARCHAR2(40), BASE_LOCATION VARCHAR2(100), TOMCAT_HOME VARCHAR2(100), HTTP_PORT NUMBER, SYS_USER VARCHAR2(8), SYS_GROUP VARCHAR2(8), CONF_ENTRY BLOB, TOMCAT_TYPE NUMBER DEFAULT 4, DESCRIPTION VARCHAR2(100), STD_OUT_LOG VARCHAR2(300), START_CLASS VARCHAR2(40), JAVA_HOME VARCHAR2(300) ) LOGGING NOCACHE NOPARALLEL;
 
 
 CREATE TABLE TM_ENTITY ( ENTITY_ID NUMBER NOT NULL, ENTITY_NAME VARCHAR2(60) NOT NULL, DOC_BASE VARCHAR2(500) NOT NULL, ENTITY_STATE_ID NUMBER NOT NULL, ENV_ID NUMBER NOT NULL, TOMCAT_POOL_ID NUMBER, ENTITY_DEFIN VARCHAR2(4000), EX_PROJECT_ID NUMBER DEFAULT 0 ) LOGGING NOCACHE NOPARALLEL;
@@ -326,4 +326,5 @@
 ALTER TABLE TMC_REL_HELP_TOPIC ADD (  CONSTRAINT FK_REL_HELP_ITEM_ID FOREIGN KEY (HELP_ITEM_ID) REFERENCES TMC_HELP_ITEM (HELP_ITEM_ID) ON DELETE CASCADE,  CONSTRAINT FK_SUBTOPIC_ID FOREIGN KEY (SUBTOPIC_ID) REFERENCES TMC_TOPIC (TOPIC_ID) ON DELETE CASCADE,  CONSTRAINT FK_TOPIC_ID FOREIGN KEY (TOPIC_ID) REFERENCES TMC_TOPIC (TOPIC_ID) ON DELETE CASCADE);
 
 ALTER TABLE TM_REL_ENTITY_PROJECT ADD (  CONSTRAINT ENTITY_ID_FK FOREIGN KEY (ENTITY_ID) REFERENCES TM_ENTITY (ENTITY_ID) ON DELETE CASCADE DISABLE,  CONSTRAINT PROJECT_ID_FK FOREIGN KEY (PROJECT_ID) REFERENCES TMC_PROJECT (PROJECT_ID) ON DELETE CASCADE DISABLE);
+
 

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/job/Job.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/job/Job.java?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/job/Job.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/api/job/Job.java Mon Oct 15 11:54:31 2007
@@ -703,6 +703,7 @@
   public static Collection<Job> getJobs(Instance i, State s) throws SQLException {
     Collection<Job> c;
     try {
+    	logger.info("Get jobs for instance "+i.getPk()+" and state "+s.getPk());
       c = broker.getObjects(Job.class,
                             false, "core.job.by.instance.state",
                             i.getPk(), s.getPk());
@@ -867,6 +868,7 @@
   }
 
 } // end of Job
+
 
 
 

Modified: incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/AdminBean.java
URL: http://svn.apache.org/viewvc/incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/AdminBean.java?rev=584847&r1=584846&r2=584847&view=diff
==============================================================================
--- incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/AdminBean.java (original)
+++ incubator/lokahi/lokahi/trunk/src/java/org/apache/lokahi/core/controller/AdminBean.java Mon Oct 15 11:54:31 2007
@@ -148,6 +148,7 @@
       PreparedStatement psmt;
       psmt = conn.prepareStatement("select 'PRIMARY',primary_jvm,'BACKUP', backup_jvm, 'ALTERNATE', alternate_jvm from TMC_ADMIN where INSTANCE_ID=?;");
 
+      logger.info("Psmt:"+psmt+"/Inst:"+this.getInstance());
       psmt.setInt(1, this.getInstance().getPk());
       psmt.execute();
 
@@ -156,7 +157,7 @@
       // retrieve the array as an oracle array
       ResultSet rs = psmt.getResultSet();
       while (rs.next()) {
-          for (int i=0;i<rs.getMetaData().getColumnCount();i=i+2) {
+          for (int i=1;i<=rs.getMetaData().getColumnCount();i=i+2) {
               Object attrs[] = { rs.getString(i), rs.getString(i+1)};
               String val1 = (attrs[0] != null) ? (String) attrs[0] : null;
               String val2 = (attrs[1] != null) ? (String) attrs[1] : "";
@@ -228,7 +229,10 @@
 
     CallableStatement csmt;
     try {
-      csmt = conn.prepareCall("{call " + schema_owner + ".sp_update_admin_jvm_role(?,?,?,?)}");
+        if ("oracle".equals(PropertiesFile.getConstantValue("lokahi.broker.type")))
+            csmt = conn.prepareCall("{call " + schema_owner + ".sp_update_admin_jvm_role(?,?,?,?)}");
+        else
+            csmt = conn.prepareCall("{call sp_update_admin_jvm_role(?,?,?,?)}");
       csmt.setString(1, (String) admin_jvms.get("PRIMARY")); // primary
       csmt.setString(2, (String) admin_jvms.get("BACKUP")); // backup
       csmt.setString(3, alternate); // alternate



Mime
View raw message