diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index b8afdce9f6..b4cfddddc1 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,11 @@ +2010-01-15 Pablo de la ConcepciĆ³n + + * pandoradb.sql, extras/pandoradb_migrate_v3.0_to_v3.1.sql: Modified DB + schema to give a default value to start_timestamp on tgis_data, without + it as is a timestamp MySQL sets the default value as CURRENT_TIMESTAMP + and also sets the CURRENT_TIMESTAMP ON UPDATE, setting the DEFAULT + CURRENT_TIMESTAMP prevents MySQL to set the ON UPDATE CURRENT_TIMESTAMP. + 2010-01-14 Pablo de la ConcepciĆ³n * pandoradb.sql, extras/pandoradb_migrate_v3.0_to_v3.1.sql: Modified DB diff --git a/pandora_console/extras/pandoradb_migrate_v3.0_to_v3.1.sql b/pandora_console/extras/pandoradb_migrate_v3.0_to_v3.1.sql index bbc35be076..f55b657d8c 100644 --- a/pandora_console/extras/pandoradb_migrate_v3.0_to_v3.1.sql +++ b/pandora_console/extras/pandoradb_migrate_v3.0_to_v3.1.sql @@ -17,7 +17,7 @@ CREATE TABLE IF NOT EXISTS `tgis_data` ( `longitude` DOUBLE NOT NULL , `latitude` DOUBLE NOT NULL , `altitude` DOUBLE NULL , - `start_timestamp` TIMESTAMP NOT NULL COMMENT 'timestamp on wich the agente started to be in this position' , + `start_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'timestamp on wich the agente started to be in this position' , `end_timestamp` TIMESTAMP NULL COMMENT 'timestamp on wich the agent was placed for last time on this position' , `description` TEXT NULL COMMENT 'description of the region correoponding to this placemnt' , `manual_placement` TINYINT(1) NULL DEFAULT 0 COMMENT '0 to show that the position cames from the agent, 1 to show that the position was established manualy' , diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index 94a6ef2dbc..cac1b0e8ae 100644 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -867,7 +867,7 @@ CREATE TABLE IF NOT EXISTS `tgis_data` ( `longitude` DOUBLE NOT NULL , `latitude` DOUBLE NOT NULL , `altitude` DOUBLE NULL , - `start_timestamp` TIMESTAMP NOT NULL COMMENT 'timestamp on wich the agente started to be in this position' , + `start_timestamp` TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT 'timestamp on wich the agente started to be in this position' , `end_timestamp` TIMESTAMP NULL COMMENT 'timestamp on wich the agent was placed for last time on this position' , `description` TEXT NULL COMMENT 'description of the region correoponding to this placemnt' , `manual_placement` TINYINT(1) NULL DEFAULT 0 COMMENT '0 to show that the position cames from the agent, 1 to show that the position was established manualy' ,