diff --git a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql index 4b474911c5..b7dfbe8f52 100644 --- a/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql +++ b/pandora_console/extras/pandoradb_migrate_5.1_to_6.0.mysql.sql @@ -160,13 +160,21 @@ CREATE TABLE IF NOT EXISTS `tgis_map_has_tgis_map_con` ( INSERT INTO `tgis_map_has_tgis_map_con` SELECT * FROM `tgis_map_has_tgis_map_connection`; DROP TABLE `tgis_map_has_tgis_map_connection`; -ALTER TABLE `tmodule_relationship` - --ADD COLUMN `id_rt` int(10) unsigned NOT NULL DEFAULT 0, - ADD FOREIGN KEY (`id_rt`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE; - ALTER TABLE tmodule_relationship MODIFY `id_rt` int(10) unsigned NULL default NULL; +ALTER TABLE `tmodule_relationship` ADD FOREIGN KEY (`id_rt`) REFERENCES trecon_task(`id_rt`) ON DELETE CASCADE; +ALTER TABLE tmodule_relationship MODIFY `id_rt` int(10) unsigned NULL default NULL; -- --------------------------------------------------------------------- --- Table `tevent_filter` --- --------------------------------------------------------------------- -ALTER TABLE tevent_filter ADD COLUMN `id_agent_module` int(25) DEFAULT 0; -ALTER TABLE tevent_filter ADD COLUMN `id_agent` int(25) DEFAULT 0; +-- Table `tagente_modulo` +-- --------------------------------------------------------------------- +ALTER TABLE tagente_modulo ADD COLUMN `dynamic_interval` int(4) unsigned default '0'; +ALTER TABLE tagente_modulo ADD COLUMN `dynamic_max` bigint(20) default '0'; +ALTER TABLE tagente_modulo ADD COLUMN `dynamic_min` bigint(20) default '0'; +ALTER TABLE tagente_modulo ADD COLUMN `prediction_sample_window` int(10) default 0; +ALTER TABLE tagente_modulo ADD COLUMN `prediction_samples` int(4) default 0; +ALTER TABLE tagente_modulo ADD COLUMN `prediction_threshold` int(4) default 0; + +-- --------------------------------------------------------------------- +-- Table `tagente_estado` +-- --------------------------------------------------------------------- +ALTER TABLE tagente_estado ADD COLUMN `last_dynamic_update` bigint(20) NOT NULL default '0'; + diff --git a/pandora_console/pandoradb.sql b/pandora_console/pandoradb.sql index e025938192..90e6728a55 100755 --- a/pandora_console/pandoradb.sql +++ b/pandora_console/pandoradb.sql @@ -155,6 +155,7 @@ CREATE TABLE IF NOT EXISTS `tagente_estado` ( `last_known_status` tinyint(4) default 0, `last_error` int(4) NOT NULL default '0', `ff_start_utimestamp` bigint(20) default 0, + `last_dynamic_update` bigint(20) NOT NULL default '0', PRIMARY KEY (`id_agente_estado`), KEY `status_index_1` (`id_agente_modulo`), KEY `idx_agente` (`id_agente`), @@ -241,8 +242,11 @@ CREATE TABLE IF NOT EXISTS `tagente_modulo` ( `each_ff` tinyint(1) unsigned default '0', `ff_timeout` int(4) unsigned default '0', `dynamic_interval` int(4) unsigned default '0', - `dynamic_max` bigint(20) default '0', - `dynamic_min` bigint(20) default '0', + `dynamic_max` int(4) default '0', + `dynamic_min` int(4) default '0', + `prediction_sample_window` int(10) default 0, + `prediction_samples` int(4) default 0, + `prediction_threshold` int(4) default 0, PRIMARY KEY (`id_agente_modulo`), KEY `main_idx` (`id_agente_modulo`,`id_agente`), KEY `tam_agente` (`id_agente`),