2010-01-14 Pablo de la Concepción <pablo.concepcion@artica.es>
* pandoradb.sql, extras/pandoradb_migrate_v3.0_to_v3.1.sql: Modified DB schema to add, group_id and zoom_level to the table tgis_map and set the primary keys of the new tables as autoincremet. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@2271 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
16c7ebca5a
commit
98917006f3
|
@ -1,3 +1,9 @@
|
||||||
|
2010-01-14 Pablo de la Concepción <pablo.concepcion@artica.es>
|
||||||
|
|
||||||
|
* pandoradb.sql, extras/pandoradb_migrate_v3.0_to_v3.1.sql: Modified DB
|
||||||
|
schema to add, group_id and zoom_level to the table tgis_map and set the
|
||||||
|
primary keys of the new tables as autoincremet.
|
||||||
|
|
||||||
2010-01-13 Pablo de la Concepción <pablo.concepcion@artica.es>
|
2010-01-13 Pablo de la Concepción <pablo.concepcion@artica.es>
|
||||||
|
|
||||||
* pandoradb.sql, extras/pandoradb_migrate_v3.0_to_v3.1.sql: Modified DB
|
* pandoradb.sql, extras/pandoradb_migrate_v3.0_to_v3.1.sql: Modified DB
|
||||||
|
|
|
@ -6,8 +6,8 @@ ALTER TABLE tagente ADD `last_longitude` DOUBLE NULL COMMENT 'last longitude of
|
||||||
ALTER TABLE tagente ADD `last_altitude` DOUBLE NULL COMMENT 'last altitude of the agent' ;
|
ALTER TABLE tagente ADD `last_altitude` DOUBLE NULL COMMENT 'last altitude of the agent' ;
|
||||||
|
|
||||||
ALTER TABLE `tgraph_source` CHANGE `weight` `weight` float(5,3) UNSIGNED NOT NULL DEFAULT 0;
|
ALTER TABLE `tgraph_source` CHANGE `weight` `weight` float(5,3) UNSIGNED NOT NULL DEFAULT 0;
|
||||||
-- GIS extension Tables
|
|
||||||
|
|
||||||
|
-- GIS extension Tables
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_data`
|
-- Table `tgis_data`
|
||||||
|
@ -28,30 +28,30 @@ CREATE TABLE IF NOT EXISTS `tgis_data` (
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table to store GIS information of the agents';
|
COMMENT = 'Table to store GIS information of the agents';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_map`
|
-- Table `tgis_map`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
||||||
`id_tgis_map` INT NOT NULL COMMENT 'table identifier' ,
|
`id_tgis_map` INT NOT NULL AUTO_INCREMENT COMMENT 'table identifier' ,
|
||||||
`map_name` VARCHAR(63) NOT NULL COMMENT 'Name of the map' ,
|
`map_name` VARCHAR(63) NOT NULL COMMENT 'Name of the map' ,
|
||||||
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
||||||
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
||||||
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
||||||
|
`zoom_level` TINYINT(2) NULL DEFAULT '1' COMMENT 'Zoom level to show when the map is loaded.' ,
|
||||||
`map_background` VARCHAR(127) NULL COMMENT 'path on the server to the background image of the map' ,
|
`map_background` VARCHAR(127) NULL COMMENT 'path on the server to the background image of the map' ,
|
||||||
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
||||||
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
||||||
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
||||||
|
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map' ,
|
||||||
PRIMARY KEY (`id_tgis_map`) )
|
PRIMARY KEY (`id_tgis_map`) )
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table containing information about a gis map';
|
COMMENT = 'Table containing information about a gis map';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_map_connection`
|
-- Table `tgis_map_connection`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
||||||
`id_tmap_connection` INT NOT NULL COMMENT 'table id' ,
|
`id_tmap_connection` INT NOT NULL AUTO_INCREMENT COMMENT 'table id' ,
|
||||||
`conection_data` TEXT NULL COMMENT 'connection information (this can probably change to fit better the possible connection parameters)' ,
|
`conection_data` TEXT NULL COMMENT 'connection information (this can probably change to fit better the possible connection parameters)' ,
|
||||||
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map that uses this connection' ,
|
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map that uses this connection' ,
|
||||||
PRIMARY KEY (`id_tmap_connection`) ,
|
PRIMARY KEY (`id_tmap_connection`) ,
|
||||||
|
@ -64,12 +64,11 @@ CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table to store the map connection information';
|
COMMENT = 'Table to store the map connection information';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_map_layer`
|
-- Table `tgis_map_layer`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map_layer` (
|
CREATE TABLE IF NOT EXISTS `tgis_map_layer` (
|
||||||
`id_tmap_layer` INT NOT NULL COMMENT 'table id' ,
|
`id_tmap_layer` INT NOT NULL AUTO_INCREMENT COMMENT 'table id' ,
|
||||||
`layer_name` VARCHAR(45) NOT NULL COMMENT 'Name of the layer ' ,
|
`layer_name` VARCHAR(45) NOT NULL COMMENT 'Name of the layer ' ,
|
||||||
`view_layer` TINYINT(1) NOT NULL DEFAULT TRUE COMMENT 'True if the layer must be shown' ,
|
`view_layer` TINYINT(1) NOT NULL DEFAULT TRUE COMMENT 'True if the layer must be shown' ,
|
||||||
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map containing the layer' ,
|
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map containing the layer' ,
|
||||||
|
@ -89,4 +88,3 @@ CREATE TABLE IF NOT EXISTS `tgis_map_layer` (
|
||||||
ON UPDATE NO ACTION)
|
ON UPDATE NO ACTION)
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table containing information about the map layers';
|
COMMENT = 'Table containing information about the map layers';
|
||||||
|
|
||||||
|
|
|
@ -859,7 +859,6 @@ CREATE TABLE IF NOT EXISTS `tplanned_downtime_agents` (
|
||||||
|
|
||||||
-- GIS extension Tables
|
-- GIS extension Tables
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_data`
|
-- Table `tgis_data`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
|
@ -879,30 +878,30 @@ CREATE TABLE IF NOT EXISTS `tgis_data` (
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table to store GIS information of the agents';
|
COMMENT = 'Table to store GIS information of the agents';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_map`
|
-- Table `tgis_map`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
CREATE TABLE IF NOT EXISTS `tgis_map` (
|
||||||
`id_tgis_map` INT NOT NULL COMMENT 'table identifier' ,
|
`id_tgis_map` INT NOT NULL AUTO_INCREMENT COMMENT 'table identifier' ,
|
||||||
`map_name` VARCHAR(63) NOT NULL COMMENT 'Name of the map' ,
|
`map_name` VARCHAR(63) NOT NULL COMMENT 'Name of the map' ,
|
||||||
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
`initial_longitude` DOUBLE NULL COMMENT 'longitude of the center of the map when it\'s loaded' ,
|
||||||
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
`initial_latitude` DOUBLE NULL COMMENT 'latitude of the center of the map when it\'s loaded' ,
|
||||||
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
`initial_altitude` DOUBLE NULL COMMENT 'altitude of the center of the map when it\'s loaded' ,
|
||||||
|
`zoom_level` TINYINT(2) NULL DEFAULT '1' COMMENT 'Zoom level to show when the map is loaded.' ,
|
||||||
`map_background` VARCHAR(127) NULL COMMENT 'path on the server to the background image of the map' ,
|
`map_background` VARCHAR(127) NULL COMMENT 'path on the server to the background image of the map' ,
|
||||||
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
`default_longitude` DOUBLE NULL COMMENT 'default longitude for the agents placed on the map' ,
|
||||||
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
`default_latitude` DOUBLE NULL COMMENT 'default latitude for the agents placed on the map' ,
|
||||||
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
`default_altitude` DOUBLE NULL COMMENT 'default altitude for the agents placed on the map' ,
|
||||||
|
`group_id` INT(10) NOT NULL DEFAULT 0 COMMENT 'Group that owns the map' ,
|
||||||
PRIMARY KEY (`id_tgis_map`) )
|
PRIMARY KEY (`id_tgis_map`) )
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table containing information about a gis map';
|
COMMENT = 'Table containing information about a gis map';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_map_connection`
|
-- Table `tgis_map_connection`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
||||||
`id_tmap_connection` INT NOT NULL COMMENT 'table id' ,
|
`id_tmap_connection` INT NOT NULL AUTO_INCREMENT COMMENT 'table id' ,
|
||||||
`conection_data` TEXT NULL COMMENT 'connection information (this can probably change to fit better the possible connection parameters)' ,
|
`conection_data` TEXT NULL COMMENT 'connection information (this can probably change to fit better the possible connection parameters)' ,
|
||||||
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map that uses this connection' ,
|
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map that uses this connection' ,
|
||||||
PRIMARY KEY (`id_tmap_connection`) ,
|
PRIMARY KEY (`id_tmap_connection`) ,
|
||||||
|
@ -915,12 +914,11 @@ CREATE TABLE IF NOT EXISTS `tgis_map_connection` (
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table to store the map connection information';
|
COMMENT = 'Table to store the map connection information';
|
||||||
|
|
||||||
|
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
-- Table `tgis_map_layer`
|
-- Table `tgis_map_layer`
|
||||||
-- -----------------------------------------------------
|
-- -----------------------------------------------------
|
||||||
CREATE TABLE IF NOT EXISTS `tgis_map_layer` (
|
CREATE TABLE IF NOT EXISTS `tgis_map_layer` (
|
||||||
`id_tmap_layer` INT NOT NULL COMMENT 'table id' ,
|
`id_tmap_layer` INT NOT NULL AUTO_INCREMENT COMMENT 'table id' ,
|
||||||
`layer_name` VARCHAR(45) NOT NULL COMMENT 'Name of the layer ' ,
|
`layer_name` VARCHAR(45) NOT NULL COMMENT 'Name of the layer ' ,
|
||||||
`view_layer` TINYINT(1) NOT NULL DEFAULT TRUE COMMENT 'True if the layer must be shown' ,
|
`view_layer` TINYINT(1) NOT NULL DEFAULT TRUE COMMENT 'True if the layer must be shown' ,
|
||||||
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map containing the layer' ,
|
`tgis_map_id_tgis_map` INT NOT NULL COMMENT 'reference to the map containing the layer' ,
|
||||||
|
@ -940,4 +938,3 @@ CREATE TABLE IF NOT EXISTS `tgis_map_layer` (
|
||||||
ON UPDATE NO ACTION)
|
ON UPDATE NO ACTION)
|
||||||
ENGINE = InnoDB
|
ENGINE = InnoDB
|
||||||
COMMENT = 'Table containing information about the map layers';
|
COMMENT = 'Table containing information about the map layers';
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue