airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From scnakand...@apache.org
Subject [1/4] airavata git commit: changing the mysql script
Date Thu, 17 Dec 2015 05:11:44 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 1837eea8c -> 74201879b


changing the mysql script


Project: http://git-wip-us.apache.org/repos/asf/airavata/repo
Commit: http://git-wip-us.apache.org/repos/asf/airavata/commit/fd62b238
Tree: http://git-wip-us.apache.org/repos/asf/airavata/tree/fd62b238
Diff: http://git-wip-us.apache.org/repos/asf/airavata/diff/fd62b238

Branch: refs/heads/master
Commit: fd62b238e14bb769c887121731f4f39b0777527e
Parents: 1837eea
Author: scnakandala <supun.nakandala@gmail.com>
Authored: Wed Dec 16 22:42:54 2015 -0500
Committer: scnakandala <supun.nakandala@gmail.com>
Committed: Wed Dec 16 22:42:54 2015 -0500

----------------------------------------------------------------------
 .../registry/core/data/catalog/impl/DataCatalogImpl.java  |  2 +-
 .../src/main/resources/datacatalog-mysql.sql              | 10 +++++-----
 2 files changed, 6 insertions(+), 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/fd62b238/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
index 0957709..91e3ce5 100644
--- a/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
+++ b/modules/registry/registry-core/src/main/java/org/apache/airavata/registry/core/data/catalog/impl/DataCatalogImpl.java
@@ -41,7 +41,7 @@ public class DataCatalogImpl implements DataCatalog {
 
     private final static Logger logger = LoggerFactory.getLogger(DataCatalogImpl.class);
 
-    private final static long DEFAULT_REPLICA_VALID_TIME = 1000 * 60 * 60 * 24 * 365 + 10;
+    private final static long DEFAULT_REPLICA_VALID_TIME = 1000 * 60 * 60 * 24 * 365 * 10;
 
     @Override
     public String registerResource(DataResourceModel resourceModel) throws DataCatalogException
{

http://git-wip-us.apache.org/repos/asf/airavata/blob/fd62b238/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
index 7bff542..cb10b5b 100644
--- a/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/datacatalog-mysql.sql
@@ -28,8 +28,8 @@ CREATE TABLE DATA_RESOURCE
         OWNER_NAME VARCHAR (255),
         PARENT_RESOURCE_ID VARCHAR (255),
         RESOURCE_SIZE INT,
-        CREATION_TIME TIMESTAMP,
-        LAST_MODIFIED_TIME TIMESTAMP,
+        CREATION_TIME TIMESTAMP DEFAULT NULL,
+        LAST_MODIFIED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
,
         PRIMARY KEY (RESOURCE_ID)
 );
 
@@ -41,9 +41,9 @@ CREATE TABLE DATA_REPLICA_LOCATION
         REPLICA_DESCRIPTION VARCHAR (1024),
         STORAGE_RESOURCE_ID VARCHAR (255),
         FILE_ABSOLUTE_PATH VARCHAR (4096),
-        CREATION_TIME TIMESTAMP,
-        LAST_MODIFIED_TIME TIMESTAMP,
-        VALID_UNTIL_TIME TIMESTAMP,
+        CREATION_TIME TIMESTAMP DEFAULT NULL,
+        LAST_MODIFIED_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP
,
+        VALID_UNTIL_TIME TIMESTAMP DEFAULT NULL,
         PRIMARY KEY (REPLICA_ID),
         FOREIGN KEY (RESOURCE_ID) REFERENCES DATA_RESOURCE(RESOURCE_ID) ON DELETE CASCADE
 );


Mime
View raw message