airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/3] adding created time and update time to app catalog
Date Thu, 14 Aug 2014 20:24:35 GMT
Repository: airavata
Updated Branches:
  refs/heads/master b19a8e06d -> 404913acd


http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
index e2005ee..c94a8b1 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/SshJobSubmissionResource.java
@@ -19,6 +19,7 @@
 
 package org.apache.aiaravata.application.catalog.data.resources;
 
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -43,6 +44,24 @@ public class SshJobSubmissionResource extends AbstractResource {
 	private String alternativeSshHostname;
 	private String securityProtocol;
 	private int sshPort;
+    private Timestamp createdTime;
+    private Timestamp updatedTime;
+
+    public Timestamp getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Timestamp createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Timestamp getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Timestamp updatedTime) {
+        this.updatedTime = updatedTime;
+    }
 	
 	@Override
 	public void remove(Object identifier) throws AppCatalogException {
@@ -198,8 +217,10 @@ public class SshJobSubmissionResource extends AbstractResource {
 			em.getTransaction().begin();
 			if (existingSshJobSubmission == null) {
 				sshJobSubmission = new SshJobSubmission();
+                sshJobSubmission.setCreationTime(createdTime);
 			} else {
 				sshJobSubmission = existingSshJobSubmission;
+                sshJobSubmission.setUpdateTime(updatedTime);
 			}
 			sshJobSubmission.setResourceJobManagerId(getResourceJobManagerId());
 			ResourceJobManager resourceJobManager = em.find(ResourceJobManager.class, getResourceJobManagerId());

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
index c9a14fc..f0d59d1 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/resources/WorkflowResource.java
@@ -32,6 +32,7 @@ import org.slf4j.LoggerFactory;
 
 import javax.persistence.EntityManager;
 import javax.persistence.Query;
+import java.sql.Timestamp;
 import java.util.ArrayList;
 import java.util.List;
 
@@ -41,6 +42,24 @@ public class WorkflowResource extends AbstractResource {
     private String createdUser;
     private String graph;
     private String wfTemplateId;
+    private Timestamp createdTime;
+    private Timestamp updatedTime;
+
+    public Timestamp getCreatedTime() {
+        return createdTime;
+    }
+
+    public void setCreatedTime(Timestamp createdTime) {
+        this.createdTime = createdTime;
+    }
+
+    public Timestamp getUpdatedTime() {
+        return updatedTime;
+    }
+
+    public void setUpdatedTime(Timestamp updatedTime) {
+        this.updatedTime = updatedTime;
+    }
 
     @Override
     public void remove(Object identifier) throws AppCatalogException {
@@ -252,8 +271,10 @@ public class WorkflowResource extends AbstractResource {
             em.getTransaction().begin();
             if (existingWorkflow == null) {
                 workflow = new Workflow();
+                workflow.setCreatedUser(createdUser);
             } else {
                 workflow = existingWorkflow;
+                workflow.setUpdateTime(updatedTime);
             }
             workflow.setWfName(getWfName());
             workflow.setCreatedUser(getCreatedUser());

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
index 367cfc3..8f23822 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogJPAUtils.java
@@ -177,20 +177,20 @@ public class AppCatalogJPAUtils {
 					logger.error("Object should be a Gridftp Endpoint.", new IllegalArgumentException());
 					throw new IllegalArgumentException("Object should be a Gridftp Endpoint.");
 				}
-            case JOB_SUBMISSION_PROTOCOL:
-                if (o instanceof JobSubmissionProtocol){
-                    return createJobSubmissionProtocol((JobSubmissionProtocol) o);
-                }else {
-                    logger.error("Object should be a JobSubmissionProtocol.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a JobSubmissionProtocol.");
-                }
-            case DATA_MOVEMENT_PROTOCOL:
-                if (o instanceof DataMovementProtocol){
-                    return createDataMovementProtocol((DataMovementProtocol) o);
-                }else {
-                    logger.error("Object should be a DataMovementProtocol.", new IllegalArgumentException());
-                    throw new IllegalArgumentException("Object should be a DataMovementProtocol.");
-                }
+//            case JOB_SUBMISSION_PROTOCOL:
+//                if (o instanceof JobSubmissionProtocol){
+//                    return createJobSubmissionProtocol((JobSubmissionProtocol) o);
+//                }else {
+//                    logger.error("Object should be a JobSubmissionProtocol.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a JobSubmissionProtocol.");
+//                }
+//            case DATA_MOVEMENT_PROTOCOL:
+//                if (o instanceof DataMovementProtocol){
+//                    return createDataMovementProtocol((DataMovementProtocol) o);
+//                }else {
+//                    logger.error("Object should be a DataMovementProtocol.", new IllegalArgumentException());
+//                    throw new IllegalArgumentException("Object should be a DataMovementProtocol.");
+//                }
             case APPLICATION_MODULE:
                 if (o instanceof ApplicationModule){
                     return createApplicationModule((ApplicationModule) o);
@@ -358,6 +358,10 @@ public class AppCatalogJPAUtils {
             localSubmissionResource.setResourceJobManagerId(o.getResourceJobManagerId());
             localSubmissionResource.setResourceJobManagerResource((ResourceJobManagerResource)createResourceJobManager(o.getResourceJobManager()));
             localSubmissionResource.setJobSubmissionInterfaceId(o.getJobSubmissionInterfaceId());
+            localSubmissionResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                localSubmissionResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return localSubmissionResource;
 	}
@@ -380,6 +384,10 @@ public class AppCatalogJPAUtils {
             resourceJobManagerResource.setPushMonitoringEndpoint(o.getPushMonitoringEndpoint());
             resourceJobManagerResource.setJobManagerBinPath(o.getJobManagerBinPath());
             resourceJobManagerResource.setResourceJobManagerType(o.getResourceJobManagerType());
+            resourceJobManagerResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                resourceJobManagerResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return resourceJobManagerResource;
 	}
@@ -392,6 +400,10 @@ public class AppCatalogJPAUtils {
             dataMovementInterfaceResource.setDataMovementProtocol(o.getDataMovementProtocol());
             dataMovementInterfaceResource.setDataMovementInterfaceId(o.getDataMovementInterfaceId());
             dataMovementInterfaceResource.setPriorityOrder(o.getPriorityOrder());
+            dataMovementInterfaceResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                dataMovementInterfaceResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return dataMovementInterfaceResource;
 	}
@@ -404,6 +416,10 @@ public class AppCatalogJPAUtils {
             jobSubmissionInterfaceResource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
             jobSubmissionInterfaceResource.setJobSubmissionProtocol(o.getJobSubmissionProtocol());
             jobSubmissionInterfaceResource.setPriorityOrder(o.getPriorityOrder());
+            jobSubmissionInterfaceResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                jobSubmissionInterfaceResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return jobSubmissionInterfaceResource;
 	}
@@ -439,6 +455,10 @@ public class AppCatalogJPAUtils {
             computeResourceResource.setResourceDescription(o.getResourceDescription());
             computeResourceResource.setResourceId(o.getResourceId());
             computeResourceResource.setHostName(o.getHostName());
+            computeResourceResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                computeResourceResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return computeResourceResource;
 	}
@@ -534,6 +554,10 @@ public class AppCatalogJPAUtils {
             sshJobSubmissionResource.setAlternativeSshHostname(o.getAlternativeSshHostname());
             sshJobSubmissionResource.setSecurityProtocol(o.getSecurityProtocol());
             sshJobSubmissionResource.setSshPort(o.getSshPort());
+            sshJobSubmissionResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                sshJobSubmissionResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
         return sshJobSubmissionResource;
     }
@@ -546,6 +570,10 @@ public class AppCatalogJPAUtils {
             scpDataMovementResource.setSecurityProtocol(o.getSecurityProtocol());
             scpDataMovementResource.setAlternativeScpHostname(o.getAlternativeScpHostname());
             scpDataMovementResource.setSshPort(o.getSshPort());
+            scpDataMovementResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                scpDataMovementResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return scpDataMovementResource;
 	}
@@ -555,6 +583,10 @@ public class AppCatalogJPAUtils {
         if (o != null){
             gridftpDataMovementResource.setDataMovementInterfaceId(o.getDataMovementInterfaceId());
             gridftpDataMovementResource.setSecurityProtocol(o.getSecurityProtocol());
+            gridftpDataMovementResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                gridftpDataMovementResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return gridftpDataMovementResource;
 	}
@@ -565,31 +597,35 @@ public class AppCatalogJPAUtils {
             gridftpEndpointResource.setEndpoint(o.getEndpoint());
             gridftpEndpointResource.setDataMovementInterfaceId(o.getDataMovementInterfaceId());
             gridftpEndpointResource.setGridftpDataMovementResource((GridftpDataMovementResource)createGridftpDataMovement(o.getGridftpDataMovement()));
+            gridftpEndpointResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                gridftpEndpointResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
 		return gridftpEndpointResource;
 	}
 
-    private static Resource createJobSubmissionProtocol(JobSubmissionProtocol o) {
-        JobSubmissionProtocolResource resource = new JobSubmissionProtocolResource();
-        if (o != null){
-            resource.setResourceID(o.getResourceID());
-            resource.setSubmissionID(o.getSubmissionID());
-            resource.setJobType(o.getJobType());
-            resource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
-        }
-        return resource;
-    }
-
-    private static Resource createDataMovementProtocol(DataMovementProtocol o) {
-        DataMovementProtocolResource resource = new DataMovementProtocolResource();
-        if (o != null) {
-            resource.setResourceID(o.getResourceID());
-            resource.setDataMoveID(o.getDataMoveID());
-            resource.setDataMoveType(o.getDataMoveType());
-            resource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
-        }
-        return resource;
-    }
+//    private static Resource createJobSubmissionProtocol(JobSubmissionProtocol o) {
+//        JobSubmissionProtocolResource resource = new JobSubmissionProtocolResource();
+//        if (o != null){
+//            resource.setResourceID(o.getResourceID());
+//            resource.setSubmissionID(o.getSubmissionID());
+//            resource.setJobType(o.getJobType());
+//            resource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
+//        }
+//        return resource;
+//    }
+//
+//    private static Resource createDataMovementProtocol(DataMovementProtocol o) {
+//        DataMovementProtocolResource resource = new DataMovementProtocolResource();
+//        if (o != null) {
+//            resource.setResourceID(o.getResourceID());
+//            resource.setDataMoveID(o.getDataMoveID());
+//            resource.setDataMoveType(o.getDataMoveType());
+//            resource.setComputeHostResource((ComputeResourceResource)createComputeResource(o.getComputeResource()));
+//        }
+//        return resource;
+//    }
 
     private static Resource createApplicationModule(ApplicationModule o) {
         AppModuleResource moduleResource = new AppModuleResource();
@@ -598,6 +634,10 @@ public class AppCatalogJPAUtils {
             moduleResource.setModuleDesc(o.getModuleDesc());
             moduleResource.setModuleName(o.getModuleName());
             moduleResource.setModuleVersion(o.getModuleVersion());
+            moduleResource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                moduleResource.setUpdatedTime(o.getUpdateTime());
+            }
         }
         return moduleResource;
     }
@@ -613,6 +653,10 @@ public class AppCatalogJPAUtils {
             resource.setParallelism(o.getParallelism());
             resource.setModuleResource((AppModuleResource) createApplicationModule(o.getApplicationModule()));
             resource.setHostResource((ComputeResourceResource) createComputeResource(o.getComputeResource()));
+            resource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                resource.setUpdatedTime(o.getUpdateTime());
+            }
         }
         return resource;
     }
@@ -656,6 +700,10 @@ public class AppCatalogJPAUtils {
             resource.setInterfaceId(o.getInterfaceID());
             resource.setAppName(o.getAppName());
             resource.setAppDescription(o.getAppDescription());
+            resource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                resource.setUpdatedTime(o.getUpdateTime());
+            }
         }
         return resource;
     }
@@ -703,6 +751,10 @@ public class AppCatalogJPAUtils {
             resource.setGatewayID(o.getGatewayID());
             resource.setGatewayName(o.getGatewayName());
             resource.setGatewayDesc(o.getGatewayDesc());
+            resource.setCreatedTime(o.getCreationTime());
+            if (o.getUpdateTime() != null){
+                resource.setUpdatedTime(o.getUpdateTime());
+            }
         }
         return resource;
     }
@@ -741,6 +793,10 @@ public class AppCatalogJPAUtils {
         if (o.getGraph() != null){
             workflowResource.setGraph(new String(o.getGraph()));
         }
+        workflowResource.setCreatedTime(o.getCreationTime());
+        if (o.getUpdateTime() != null){
+            workflowResource.setUpdatedTime(o.getUpdateTime());
+        }
         workflowResource.setWfTemplateId(o.getWfTemplateId());
         return workflowResource;
     }

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
index 24830c8..dc7766e 100644
--- a/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
+++ b/modules/app-catalog/app-catalog-data/src/main/java/org/apache/aiaravata/application/catalog/data/util/AppCatalogThriftConversion.java
@@ -200,23 +200,23 @@ public class AppCatalogThriftConversion {
         return batchQueue;
     }
     
-    public static Map<String, JobSubmissionProtocol> getJobSubmissionProtocolList(List<Resource>
resources){
-       Map<String, JobSubmissionProtocol> protocols = new HashMap<String, JobSubmissionProtocol>();
-        for (Resource resource : resources){
-            JobSubmissionProtocolResource submission = (JobSubmissionProtocolResource) resource;
-            protocols.put(submission.getSubmissionID(), JobSubmissionProtocol.valueOf(submission.getJobType()));
-        }
-        return protocols;
-    }
+//    public static Map<String, JobSubmissionProtocol> getJobSubmissionProtocolList(List<Resource>
resources){
+//       Map<String, JobSubmissionProtocol> protocols = new HashMap<String, JobSubmissionProtocol>();
+//        for (Resource resource : resources){
+//            JobSubmissionProtocolResource submission = (JobSubmissionProtocolResource)
resource;
+//            protocols.put(submission.getSubmissionID(), JobSubmissionProtocol.valueOf(submission.getJobType()));
+//        }
+//        return protocols;
+//    }
 
-    public static Map<String, DataMovementProtocol> getDataMoveProtocolList(List<Resource>
resources){
-        Map<String, DataMovementProtocol> protocols = new HashMap<String, DataMovementProtocol>();
-        for (Resource resource : resources){
-            DataMovementProtocolResource protocolResource = (DataMovementProtocolResource)
resource;
-            protocols.put(protocolResource.getDataMoveID(), DataMovementProtocol.valueOf(protocolResource.getDataMoveType()));
-        }
-        return protocols;
-    }
+//    public static Map<String, DataMovementProtocol> getDataMoveProtocolList(List<Resource>
resources){
+//        Map<String, DataMovementProtocol> protocols = new HashMap<String, DataMovementProtocol>();
+//        for (Resource resource : resources){
+//            DataMovementProtocolResource protocolResource = (DataMovementProtocolResource)
resource;
+//            protocols.put(protocolResource.getDataMoveID(), DataMovementProtocol.valueOf(protocolResource.getDataMoveType()));
+//        }
+//        return protocols;
+//    }
 
     public static SshJobSubmissionResource getSSHJobSubmission (SSHJobSubmission submission){
     	SshJobSubmissionResource resource = new SshJobSubmissionResource();

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
index 3bf5daa..0f9bb72 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/META-INF/persistence.xml
@@ -24,7 +24,6 @@
     <persistence-unit name="appcatalog_data">
         <provider>org.apache.openjpa.persistence.PersistenceProviderImpl</provider>
         <class>org.apache.aiaravata.application.catalog.data.model.ComputeResource</class>
-        <class>org.apache.aiaravata.application.catalog.data.model.DataMovementProtocol</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GlobusJobSubmission</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GlobusGKEndpoint</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GSISSHSubmission</class>
@@ -33,7 +32,6 @@
         <class>org.apache.aiaravata.application.catalog.data.model.GSISSHPostJobCommand</class>
         <class>org.apache.aiaravata.application.catalog.data.model.HostAlias</class>
         <class>org.apache.aiaravata.application.catalog.data.model.HostIPAddress</class>
-        <class>org.apache.aiaravata.application.catalog.data.model.JobSubmissionProtocol</class>
         <class>org.apache.aiaravata.application.catalog.data.model.ScpDataMovement</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GridftpDataMovement</class>
         <class>org.apache.aiaravata.application.catalog.data.model.GridftpEndpoint</class>

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
index ca423ab..8340116 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-derby.sql
@@ -23,6 +23,8 @@ CREATE TABLE COMPUTE_RESOURCE
 	RESOURCE_ID VARCHAR (255) NOT NULL,
 	HOST_NAME VARCHAR (255) NOT NULL,
 	RESOURCE_DESCRIPTION VARCHAR (255),
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (RESOURCE_ID)
 );
 
@@ -98,6 +100,8 @@ CREATE TABLE RESOURCE_JOB_MANAGER
 	PUSH_MONITORING_ENDPOINT VARCHAR (255),
 	JOB_MANAGER_BIN_PATH VARCHAR (255),
 	RESOURCE_JOB_MANAGER_TYPE VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
 );
 
@@ -108,6 +112,8 @@ CREATE TABLE SSH_JOB_SUBMISSION
 	ALTERNATIVE_SSH_HOSTNAME VARCHAR (255),
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
 	SSH_PORT INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
@@ -119,6 +125,8 @@ CREATE TABLE SCP_DATA_MOVEMENT
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
 	ALTERNATIVE_SCP_HOSTNAME VARCHAR (255),
 	SSH_PORT INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
 );
 
@@ -126,6 +134,8 @@ CREATE TABLE GRIDFTP_DATA_MOVEMENT
 (
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
 );
 
@@ -134,26 +144,32 @@ CREATE TABLE GRIDFTP_ENDPOINT
 	ENDPOINT VARCHAR (255) NOT NULL,
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID,ENDPOINT),
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	FOREIGN KEY (DATA_MOVEMENT_INTERFACE_ID) REFERENCES GRIDFTP_DATA_MOVEMENT(DATA_MOVEMENT_INTERFACE_ID)
ON DELETE CASCADE
 );
 
-CREATE TABLE JOB_SUBMISSION_PROTOCOL
-(
-         RESOURCE_ID VARCHAR(255),
-         SUBMISSION_ID VARCHAR(255),
-         JOB_TYPE VARCHAR(255),
-         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_MOVEMENT_PROTOCOL
-(
-         RESOURCE_ID VARCHAR(255),
-         DATA_MOVE_ID VARCHAR(255),
-         DATA_MOVE_TYPE VARCHAR(255),
-         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
+--CREATE TABLE JOB_SUBMISSION_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         SUBMISSION_ID VARCHAR(255),
+--         JOB_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+--
+--CREATE TABLE DATA_MOVEMENT_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         DATA_MOVE_ID VARCHAR(255),
+--         DATA_MOVE_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
 
 CREATE TABLE APPLICATION_MODULE
 (
@@ -161,6 +177,8 @@ CREATE TABLE APPLICATION_MODULE
          MODULE_NAME VARCHAR(255),
          MODULE_VERSION VARCHAR(255),
          MODULE_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY(MODULE_ID)
 );
 
@@ -170,8 +188,10 @@ CREATE TABLE APPLICATION_DEPLOYMENT
          APP_MODULE_ID VARCHAR(255),
          COMPUTE_HOSTID VARCHAR(255),
          EXECUTABLE_PATH VARCHAR(255),
-	 PARALLELISM VARCHAR(255),
+	     PARALLELISM VARCHAR(255),
          APPLICATION_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY(DEPLOYMENT_ID),
          FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE
CASCADE,
          FOREIGN KEY (APP_MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
@@ -217,6 +237,8 @@ CREATE TABLE APPLICATION_INTERFACE
          INTERFACE_ID VARCHAR(255),
          APPLICATION_NAME VARCHAR(255),
          APPLICATION_DESCRIPTION VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY(INTERFACE_ID)
 );
 
@@ -258,6 +280,8 @@ CREATE TABLE GATEWAY_PROFILE
          GATEWAY_ID VARCHAR(255),
          GATEWAY_NAME VARCHAR(255),
          GATEWAY_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
          PRIMARY KEY(GATEWAY_ID)
 );
 
@@ -304,6 +328,8 @@ CREATE TABLE JOB_SUBMISSION_INTERFACE
 	COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
 	JOB_SUBMISSION_PROTOCOL VARCHAR (255) NOT NULL,
 	PRIORITY_ORDER INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (COMPUTE_RESOURCE_ID,JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
@@ -314,6 +340,8 @@ CREATE TABLE DATA_MOVEMENT_INTERFACE
 	DATA_MOVEMENT_PROTOCOL VARCHAR (255) NOT NULL,
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	PRIORITY_ORDER INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (COMPUTE_RESOURCE_ID,DATA_MOVEMENT_INTERFACE_ID),
 	FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
@@ -331,6 +359,8 @@ CREATE TABLE LOCAL_SUBMISSION
 (
 	RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
 	JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
@@ -347,6 +377,8 @@ CREATE TABLE WORKFLOW
 	WF_NAME VARCHAR (255) NOT NULL,
 	GRAPH CLOB,
 	OWNER VARCHAR(255),
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE CURRENT_TIMESTAMP,
 	PRIMARY KEY (WF_TEMPLATE_ID)
 );
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
index bb72c7f..5b09829 100644
--- a/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
+++ b/modules/app-catalog/app-catalog-data/src/main/resources/appcatalog-mysql.sql
@@ -23,6 +23,8 @@ CREATE TABLE COMPUTE_RESOURCE
 	RESOURCE_ID VARCHAR (255) NOT NULL,
 	HOST_NAME VARCHAR (255) NOT NULL,
 	RESOURCE_DESCRIPTION VARCHAR (255),
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (RESOURCE_ID)
 );
 
@@ -98,6 +100,8 @@ CREATE TABLE RESOURCE_JOB_MANAGER
 	PUSH_MONITORING_ENDPOINT VARCHAR (255),
 	JOB_MANAGER_BIN_PATH VARCHAR (255),
 	RESOURCE_JOB_MANAGER_TYPE VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
 );
 
@@ -108,6 +112,8 @@ CREATE TABLE SSH_JOB_SUBMISSION
 	ALTERNATIVE_SSH_HOSTNAME VARCHAR (255),
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
 	SSH_PORT INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
@@ -119,6 +125,8 @@ CREATE TABLE SCP_DATA_MOVEMENT
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
 	ALTERNATIVE_SCP_HOSTNAME VARCHAR (255),
 	SSH_PORT INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
 );
 
@@ -126,6 +134,8 @@ CREATE TABLE GRIDFTP_DATA_MOVEMENT
 (
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
 );
 
@@ -134,26 +144,28 @@ CREATE TABLE GRIDFTP_ENDPOINT
 	ENDPOINT VARCHAR (255) NOT NULL,
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID,ENDPOINT),
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	FOREIGN KEY (DATA_MOVEMENT_INTERFACE_ID) REFERENCES GRIDFTP_DATA_MOVEMENT(DATA_MOVEMENT_INTERFACE_ID)
ON DELETE CASCADE
 );
 
-CREATE TABLE JOB_SUBMISSION_PROTOCOL
-(
-         RESOURCE_ID VARCHAR(255),
-         SUBMISSION_ID VARCHAR(255),
-         JOB_TYPE VARCHAR(255),
-         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_MOVEMENT_PROTOCOL
-(
-         RESOURCE_ID VARCHAR(255),
-         DATA_MOVE_ID VARCHAR(255),
-         DATA_MOVE_TYPE VARCHAR(255),
-         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
+--CREATE TABLE JOB_SUBMISSION_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         SUBMISSION_ID VARCHAR(255),
+--         JOB_TYPE VARCHAR(255),
+--         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+--
+--CREATE TABLE DATA_MOVEMENT_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         DATA_MOVE_ID VARCHAR(255),
+--         DATA_MOVE_TYPE VARCHAR(255),
+--         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
 
 CREATE TABLE APPLICATION_MODULE
 (
@@ -161,6 +173,8 @@ CREATE TABLE APPLICATION_MODULE
          MODULE_NAME VARCHAR(255),
          MODULE_VERSION VARCHAR(255),
          MODULE_DESC VARCHAR(255),
+	     CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
          PRIMARY KEY(MODULE_ID)
 );
 
@@ -173,6 +187,8 @@ CREATE TABLE APPLICATION_DEPLOYMENT
 	     PARALLELISM VARCHAR(255),
          APPLICATION_DESC VARCHAR(255),
          ENV_MODULE_LOAD_CMD VARCHAR(255),
+	     CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
          PRIMARY KEY(DEPLOYMENT_ID),
          FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE
CASCADE,
          FOREIGN KEY (APP_MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
@@ -210,6 +226,8 @@ CREATE TABLE APPLICATION_INTERFACE
          INTERFACE_ID VARCHAR(255),
          APPLICATION_NAME VARCHAR(255),
          APPLICATION_DESCRIPTION VARCHAR(255),
+	     CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
          PRIMARY KEY(INTERFACE_ID)
 );
 
@@ -251,6 +269,8 @@ CREATE TABLE GATEWAY_PROFILE
          GATEWAY_ID VARCHAR(255),
          GATEWAY_NAME VARCHAR(255),
          GATEWAY_DESC VARCHAR(255),
+	     CREATION_TIME TIMESTAMP DEFAULT NOW(),
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
          PRIMARY KEY(GATEWAY_ID)
 );
 
@@ -297,6 +317,8 @@ CREATE TABLE JOB_SUBMISSION_INTERFACE
 	COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
 	JOB_SUBMISSION_PROTOCOL VARCHAR (255) NOT NULL,
 	PRIORITY_ORDER INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (COMPUTE_RESOURCE_ID,JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
@@ -307,6 +329,8 @@ CREATE TABLE DATA_MOVEMENT_INTERFACE
 	DATA_MOVEMENT_PROTOCOL VARCHAR (255) NOT NULL,
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	PRIORITY_ORDER INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (COMPUTE_RESOURCE_ID,DATA_MOVEMENT_INTERFACE_ID),
 	FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
@@ -324,6 +348,8 @@ CREATE TABLE LOCAL_SUBMISSION
 (
 	RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
 	JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
@@ -340,6 +366,8 @@ CREATE TABLE WORKFLOW
 	WF_NAME VARCHAR (255) NOT NULL,
 	GRAPH LONGTEXT,
 	OWNER VARCHAR(255),
+	CREATION_TIME TIMESTAMP DEFAULT NOW(),
+    UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
 	PRIMARY KEY (WF_TEMPLATE_ID)
 );
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
index ca423ab..a9da4b7 100644
--- a/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
+++ b/modules/app-catalog/app-catalog-data/src/test/resources/appcatalog-derby.sql
@@ -23,6 +23,8 @@ CREATE TABLE COMPUTE_RESOURCE
 	RESOURCE_ID VARCHAR (255) NOT NULL,
 	HOST_NAME VARCHAR (255) NOT NULL,
 	RESOURCE_DESCRIPTION VARCHAR (255),
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (RESOURCE_ID)
 );
 
@@ -98,6 +100,8 @@ CREATE TABLE RESOURCE_JOB_MANAGER
 	PUSH_MONITORING_ENDPOINT VARCHAR (255),
 	JOB_MANAGER_BIN_PATH VARCHAR (255),
 	RESOURCE_JOB_MANAGER_TYPE VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (RESOURCE_JOB_MANAGER_ID)
 );
 
@@ -108,6 +112,8 @@ CREATE TABLE SSH_JOB_SUBMISSION
 	ALTERNATIVE_SSH_HOSTNAME VARCHAR (255),
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
 	SSH_PORT INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
@@ -119,6 +125,8 @@ CREATE TABLE SCP_DATA_MOVEMENT
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
 	ALTERNATIVE_SCP_HOSTNAME VARCHAR (255),
 	SSH_PORT INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
 );
 
@@ -126,6 +134,8 @@ CREATE TABLE GRIDFTP_DATA_MOVEMENT
 (
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	SECURITY_PROTOCOL VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID)
 );
 
@@ -134,26 +144,32 @@ CREATE TABLE GRIDFTP_ENDPOINT
 	ENDPOINT VARCHAR (255) NOT NULL,
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	PRIMARY KEY (DATA_MOVEMENT_INTERFACE_ID,ENDPOINT),
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	FOREIGN KEY (DATA_MOVEMENT_INTERFACE_ID) REFERENCES GRIDFTP_DATA_MOVEMENT(DATA_MOVEMENT_INTERFACE_ID)
ON DELETE CASCADE
 );
 
-CREATE TABLE JOB_SUBMISSION_PROTOCOL
-(
-         RESOURCE_ID VARCHAR(255),
-         SUBMISSION_ID VARCHAR(255),
-         JOB_TYPE VARCHAR(255),
-         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
-
-CREATE TABLE DATA_MOVEMENT_PROTOCOL
-(
-         RESOURCE_ID VARCHAR(255),
-         DATA_MOVE_ID VARCHAR(255),
-         DATA_MOVE_TYPE VARCHAR(255),
-         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
-         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
-);
+--CREATE TABLE JOB_SUBMISSION_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         SUBMISSION_ID VARCHAR(255),
+--         JOB_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,SUBMISSION_ID,JOB_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
+--
+--CREATE TABLE DATA_MOVEMENT_PROTOCOL
+--(
+--         RESOURCE_ID VARCHAR(255),
+--         DATA_MOVE_ID VARCHAR(255),
+--         DATA_MOVE_TYPE VARCHAR(255),
+--         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+--         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+--         PRIMARY KEY(RESOURCE_ID,DATA_MOVE_ID,DATA_MOVE_TYPE),
+--         FOREIGN KEY (RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
+--);
 
 CREATE TABLE APPLICATION_MODULE
 (
@@ -161,6 +177,8 @@ CREATE TABLE APPLICATION_MODULE
          MODULE_NAME VARCHAR(255),
          MODULE_VERSION VARCHAR(255),
          MODULE_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(MODULE_ID)
 );
 
@@ -170,8 +188,10 @@ CREATE TABLE APPLICATION_DEPLOYMENT
          APP_MODULE_ID VARCHAR(255),
          COMPUTE_HOSTID VARCHAR(255),
          EXECUTABLE_PATH VARCHAR(255),
-	 PARALLELISM VARCHAR(255),
+	     PARALLELISM VARCHAR(255),
          APPLICATION_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(DEPLOYMENT_ID),
          FOREIGN KEY (COMPUTE_HOSTID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE
CASCADE,
          FOREIGN KEY (APP_MODULE_ID) REFERENCES APPLICATION_MODULE(MODULE_ID) ON DELETE CASCADE
@@ -217,6 +237,8 @@ CREATE TABLE APPLICATION_INTERFACE
          INTERFACE_ID VARCHAR(255),
          APPLICATION_NAME VARCHAR(255),
          APPLICATION_DESCRIPTION VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(INTERFACE_ID)
 );
 
@@ -258,6 +280,8 @@ CREATE TABLE GATEWAY_PROFILE
          GATEWAY_ID VARCHAR(255),
          GATEWAY_NAME VARCHAR(255),
          GATEWAY_DESC VARCHAR(255),
+         CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+         UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
          PRIMARY KEY(GATEWAY_ID)
 );
 
@@ -304,6 +328,8 @@ CREATE TABLE JOB_SUBMISSION_INTERFACE
 	COMPUTE_RESOURCE_ID VARCHAR (255) NOT NULL,
 	JOB_SUBMISSION_PROTOCOL VARCHAR (255) NOT NULL,
 	PRIORITY_ORDER INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (COMPUTE_RESOURCE_ID,JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
@@ -314,6 +340,8 @@ CREATE TABLE DATA_MOVEMENT_INTERFACE
 	DATA_MOVEMENT_PROTOCOL VARCHAR (255) NOT NULL,
 	DATA_MOVEMENT_INTERFACE_ID VARCHAR (255) NOT NULL,
 	PRIORITY_ORDER INTEGER,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (COMPUTE_RESOURCE_ID,DATA_MOVEMENT_INTERFACE_ID),
 	FOREIGN KEY (COMPUTE_RESOURCE_ID) REFERENCES COMPUTE_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );
@@ -331,6 +359,8 @@ CREATE TABLE LOCAL_SUBMISSION
 (
 	RESOURCE_JOB_MANAGER_ID VARCHAR (255) NOT NULL,
 	JOB_SUBMISSION_INTERFACE_ID VARCHAR (255) NOT NULL,
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (JOB_SUBMISSION_INTERFACE_ID),
 	FOREIGN KEY (RESOURCE_JOB_MANAGER_ID) REFERENCES RESOURCE_JOB_MANAGER(RESOURCE_JOB_MANAGER_ID)
 );
@@ -347,6 +377,8 @@ CREATE TABLE WORKFLOW
 	WF_NAME VARCHAR (255) NOT NULL,
 	GRAPH CLOB,
 	OWNER VARCHAR(255),
+	CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
+	UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
 	PRIMARY KEY (WF_TEMPLATE_ID)
 );
 

http://git-wip-us.apache.org/repos/asf/airavata/blob/404913ac/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
index a30f093..286a8fb 100644
--- a/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
+++ b/modules/registry/airavata-jpa-registry/src/main/resources/registry-mysql.sql
@@ -263,7 +263,7 @@ CREATE TABLE STATUS
         TASK_ID VARCHAR(255),
         JOB_ID VARCHAR(255),
         STATE VARCHAR(255),
-        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        STATUS_UPDATE_TIME TIMESTAMP DEFAULT '0000-00-00 00:00:00' ON UPDATE now(),
         STATUS_TYPE VARCHAR(255),
         PRIMARY KEY(STATUS_ID),
         FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE,


Mime
View raw message