airavata-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From chath...@apache.org
Subject [1/5] airavata git commit: updating database scripts to have updated time with current timestamp
Date Mon, 04 Jan 2016 19:48:35 GMT
Repository: airavata
Updated Branches:
  refs/heads/master 4286bf783 -> 276267074


updating database scripts to have updated time with current timestamp


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

Branch: refs/heads/master
Commit: c0ebe04de3cb5369897a2b6c0a7f885c40e611db
Parents: 6d09915
Author: Chathuri Wimalasena <chathuri@apache.org>
Authored: Mon Jan 4 14:16:22 2016 -0500
Committer: Chathuri Wimalasena <chathuri@apache.org>
Committed: Mon Jan 4 14:16:22 2016 -0500

----------------------------------------------------------------------
 .../src/main/resources/expcatalog-derby.sql           | 12 ++++++------
 .../src/main/resources/expcatalog-mysql.sql           | 14 +++++++-------
 2 files changed, 13 insertions(+), 13 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/airavata/blob/c0ebe04d/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
index 38a850a..7689030 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-derby.sql
@@ -122,7 +122,7 @@ CREATE TABLE EXPERIMENT_STATUS (
   STATUS_ID varchar(255),
   EXPERIMENT_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   REASON CLOB,
   PRIMARY KEY (STATUS_ID, EXPERIMENT_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
@@ -235,7 +235,7 @@ CREATE TABLE PROCESS_STATUS (
   STATUS_ID varchar(255),
   PROCESS_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   REASON CLOB,
   PRIMARY KEY (STATUS_ID, PROCESS_ID),
   FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
@@ -284,7 +284,7 @@ CREATE TABLE TASK_STATUS (
   STATUS_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   REASON CLOB,
   PRIMARY KEY (STATUS_ID, TASK_ID),
   FOREIGN KEY (TASK_ID) REFERENCES TASK(TASK_ID) ON DELETE CASCADE
@@ -308,7 +308,7 @@ CREATE TABLE JOB (
   TASK_ID varchar(255),
   PROCESS_ID varchar(255),
   JOB_DESCRIPTION CLOB NOT NULL,
-  CREATION_TIME  timestamp DEFAULT '0000-00-00 00:00:00',
+  CREATION_TIME TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   COMPUTE_RESOURCE_CONSUMED varchar(255),
   JOB_NAME varchar(255),
   WORKING_DIR varchar(255),
@@ -324,7 +324,7 @@ CREATE TABLE JOB_STATUS (
   JOB_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE  timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
   REASON CLOB,
   PRIMARY KEY (STATUS_ID, JOB_ID, TASK_ID),
   FOREIGN KEY (JOB_ID, TASK_ID) REFERENCES JOB(JOB_ID, TASK_ID) ON DELETE CASCADE
@@ -334,7 +334,7 @@ CREATE TABLE CONFIGURATION
 (
         CONFIG_KEY VARCHAR(255),
         CONFIG_VAL VARCHAR(255),
-        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        EXPIRE_DATE TIMESTAMP DEFAULT CURRENT_TIMESTAMP,
         CATEGORY_ID VARCHAR (255),
         PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
 );

http://git-wip-us.apache.org/repos/asf/airavata/blob/c0ebe04d/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
----------------------------------------------------------------------
diff --git a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
index b71b9b1..aa9c8a0 100644
--- a/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
+++ b/modules/registry/registry-core/src/main/resources/expcatalog-mysql.sql
@@ -124,7 +124,7 @@ CREATE TABLE EXPERIMENT_STATUS (
   STATUS_ID varchar(255),
   EXPERIMENT_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
   REASON LONGTEXT,
   PRIMARY KEY (STATUS_ID, EXPERIMENT_ID),
   FOREIGN KEY (EXPERIMENT_ID) REFERENCES EXPERIMENT(EXPERIMENT_ID) ON DELETE CASCADE
@@ -183,7 +183,7 @@ CREATE TABLE PROCESS (
   PROCESS_ID varchar(255),
   EXPERIMENT_ID varchar(255),
   CREATION_TIME  TIMESTAMP DEFAULT NOW(),
-  LAST_UPDATE_TIME  TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+  LAST_UPDATE_TIME  TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
   PROCESS_DETAIL text,
   APPLICATION_INTERFACE_ID varchar(255),
   TASK_DAG TEXT,
@@ -239,7 +239,7 @@ CREATE TABLE PROCESS_STATUS (
   STATUS_ID varchar(255),
   PROCESS_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE DEFAULT NOW() ON UPDATE NOW(),
   REASON LONGTEXT,
   PRIMARY KEY (STATUS_ID, PROCESS_ID),
   FOREIGN KEY (PROCESS_ID) REFERENCES PROCESS(PROCESS_ID) ON DELETE CASCADE
@@ -276,7 +276,7 @@ CREATE TABLE TASK (
   TASK_TYPE varchar(255),
   PARENT_PROCESS_ID varchar(255),
   CREATION_TIME timestamp DEFAULT NOW(),
-  LAST_UPDATE_TIME timestamp DEFAULT '0000-00-00 00:00:00',
+  LAST_UPDATE_TIME DEFAULT NOW() ON UPDATE NOW(),
   TASK_DETAIL text,
   TASK_INTERNAL_STORE tinyint(4),
   PRIMARY KEY (TASK_ID),
@@ -287,7 +287,7 @@ CREATE TABLE TASK_STATUS (
   STATUS_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE DEFAULT NOW() ON UPDATE NOW(),
   REASON LONGTEXT,
   PRIMARY KEY (STATUS_ID, TASK_ID),
   FOREIGN KEY (TASK_ID) REFERENCES TASK(TASK_ID) ON DELETE CASCADE
@@ -327,7 +327,7 @@ CREATE TABLE JOB_STATUS (
   JOB_ID varchar(255),
   TASK_ID varchar(255),
   STATE varchar(255),
-  TIME_OF_STATE_CHANGE timestamp DEFAULT '0000-00-00 00:00:00',
+  TIME_OF_STATE_CHANGE DEFAULT NOW() ON UPDATE NOW(),
   REASON LONGTEXT,
   PRIMARY KEY (STATUS_ID, JOB_ID, TASK_ID),
   FOREIGN KEY (JOB_ID, TASK_ID) REFERENCES JOB(JOB_ID, TASK_ID) ON DELETE CASCADE
@@ -338,7 +338,7 @@ CREATE TABLE CONFIGURATION
 (
         CONFIG_KEY VARCHAR(255),
         CONFIG_VAL VARCHAR(255),
-        EXPIRE_DATE TIMESTAMP DEFAULT '0000-00-00 00:00:00',
+        EXPIRE_DATE TIMESTAMP  TIMESTAMP DEFAULT NOW() ON UPDATE NOW(),
         CATEGORY_ID VARCHAR (255),
         PRIMARY KEY(CONFIG_KEY, CONFIG_VAL, CATEGORY_ID)
 );


Mime
View raw message