airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From lah...@apache.org
Subject svn commit: r1384135 - /incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
Date Wed, 12 Sep 2012 21:26:27 GMT
Author: lahiru
Date: Wed Sep 12 21:26:26 2012
New Revision: 1384135

URL: http://svn.apache.org/viewvc?rev=1384135&view=rev
Log:
adding derby script.

Added:
    incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql

Added: incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
URL: http://svn.apache.org/viewvc/incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql?rev=1384135&view=auto
==============================================================================
--- incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
(added)
+++ incubator/airavata/trunk/modules/registry/airavata-jpa-registry/src/main/resources/data-derby.sql
Wed Sep 12 21:26:26 2012
@@ -0,0 +1,144 @@
+/*
+ *
+ * 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.
+ *
+ */
+create table Gateway
+(
+        gateway_name varchar(255),
+	    owner varchar(255),
+        PRIMARY KEY (gateway_name)
+);
+
+
+create table Configuration
+(
+        config_ID int NOT NULL primary key
+        GENERATED ALWAYS AS IDENTITY
+        (START WITH 1, INCREMENT BY 1),
+        config_key varchar(255),
+        config_val varchar(255),
+        expire_date TIMESTAMP DEFAULT '0000-00-00 00:00:00'
+);
+
+create table Users
+(
+        user_name varchar(255),
+        password varchar(255),
+        PRIMARY KEY(user_name)
+);
+
+create table Gateway_Worker
+(
+      gateway_name varchar(255),
+      user_name varchar(255),
+      PRIMARY KEY (gateway_name, user_name),
+      FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+      FOREIGN KEY (user_name) REFERENCES Users(user_name) ON DELETE CASCADE
+
+);
+
+create table Project
+(
+       project_ID int NOT NULL primary key
+        GENERATED ALWAYS AS IDENTITY
+        (START WITH 1, INCREMENT BY 1),
+       gateway_name varchar(255),
+       user_name varchar(255),
+       project_name varchar(255),
+       FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+       FOREIGN KEY (user_name) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+
+create table Published_Workflow
+(
+       gateway_name varchar(255),
+       created_user varchar(255),
+       publish_workflow_name varchar(255),
+       version varchar(255),
+       published_date TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+       path varchar (255),
+       workflow_content varchar(2000),
+       PRIMARY KEY(gateway_name, publish_workflow_name),
+       FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+       FOREIGN KEY (created_user) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+
+create table User_Workflow
+
+(
+       gateway_name varchar(255),
+       owner varchar(255),
+       template_name varchar(255),
+       last_updated_date TIMESTAMP DEFAULT CURRENT_TIMESTAMP ,
+       path varchar (255),
+       workflow_graph varchar(2000),
+       PRIMARY KEY(gateway_name, owner, template_name),
+       FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+       FOREIGN KEY (owner) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+
+
+create table Host_Descriptor
+(
+       gateway_name varchar(255),
+       updated_user varchar(255),
+       host_descriptor_ID varchar(255),
+       host_descriptor_xml varchar(2000),
+       PRIMARY KEY(gateway_name, host_descriptor_ID),
+       FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+       FOREIGN KEY (updated_user) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+
+create table Service_Descriptor
+(
+         gateway_name varchar(255),
+         updated_user varchar(255),
+         service_descriptor_ID varchar(255),
+         service_descriptor_xml varchar(2000),
+         PRIMARY KEY(gateway_name,service_descriptor_ID),
+         FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+         FOREIGN KEY (updated_user) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+
+create table Application_Descriptor
+(
+         gateway_name varchar(255),
+         updated_user varchar(255),
+         application_descriptor_ID varchar(255),
+         host_descriptor_ID varchar(255),
+         service_descriptor_ID varchar(255),
+         application_descriptor_xml varchar(2000),
+         PRIMARY KEY(gateway_name,host_descriptor_ID, service_descriptor_ID,application_descriptor_ID),
+         FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+         FOREIGN KEY (updated_user) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+
+create table Experiment
+(
+          project_ID int,
+	      gateway_name varchar(255),
+          user_name varchar(255),
+          experiment_ID varchar(255),
+          submitted_date TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+          PRIMARY KEY(experiment_ID),
+          FOREIGN KEY (gateway_name) REFERENCES Gateway(gateway_name) ON DELETE CASCADE,
+          FOREIGN KEY (project_ID) REFERENCES Project(project_ID) ON DELETE CASCADE,
+          FOREIGN KEY (user_name) REFERENCES Users(user_name) ON DELETE CASCADE
+);
+



Mime
View raw message