2012-04-19 Vanessa Gil <vanessa.gil@artica.es>

* pandoradb.data.oracle.sql
	  pandoradb.data.postgreSQL.sql
	  include/pandoradb_migrate_4.0.x_to_4.1.mysql.sql
	  include/pandoradb_migrate_4.0.x_to_4.1.oracle.sql
	  include/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: Added
	table 'ttimezone' and data.


git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@6046 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
vgilc 2012-04-19 17:24:20 +00:00
parent 3e1cc1475d
commit fbf1c84533
8 changed files with 534 additions and 0 deletions

View File

@ -1,3 +1,12 @@
2012-04-19 Vanessa Gil <vanessa.gil@artica.es>
* pandoradb.data.oracle.sql
pandoradb.data.postgreSQL.sql
include/pandoradb_migrate_4.0.x_to_4.1.mysql.sql
include/pandoradb_migrate_4.0.x_to_4.1.oracle.sql
include/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: Added
table 'ttimezone' and data.
2012-04-19 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* include/functions_config.php: Added check for update manager in

View File

@ -203,3 +203,14 @@ ALTER TABLE `tmensajes` MODIFY COLUMN `mensaje` TEXT NOT NULL DEFAULT '';
-- -----------------------------------------------------
ALTER TABLE `talert_compound` ADD COLUMN `special_day` tinyint(1) DEFAULT '0';
-- -----------------------------------------------------
-- Table `ttimezone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS `ttimezone` (
`id_tz` int(10) unsigned NOT NULL auto_increment,
`zone` varchar(60) NOT NULL,
`timezone` varchar(60) NOT NULL,
PRIMARY KEY (`id_tz`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

View File

@ -199,3 +199,16 @@ ALTER TABLE tmensajes MODIFY mensaje VARCHAR2(255) NOT NULL DEFAULT '';
-- -----------------------------------------------------
alter table talert_compound add (special_day NUMBER(5,0) default 0);
-- -----------------------------------------------------
-- Table `ttimezone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ttimezone (
id_tz NUMBER(10,0) NOT NULL PRIMARY KEY,
zone VARCHAR2(60) NOT NULL,
timezone VARCHAR2(60) NOT NULL
);
CREATE SEQUENCE ttimezone_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER ttimezone_inc BEFORE INSERT ON ttimezone REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttimezone_s.nextval INTO :NEW.ID_TZ FROM dual; END ttimezone_inc;;

View File

@ -191,3 +191,13 @@ ALTER TABLE "tmensajes" ALTER COLUMN "mensaje" TYPE TEXT;
-- -----------------------------------------------------
ALTER TABLE "talert_compound" ADD COLUMN "special_day" SMALLINT default 0;
-- -----------------------------------------------------
-- Table `ttimezone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS "ttimezone" (
"id_tz" INTEGER NOT NULL PRIMARY KEY,
"zone" varchar(60) NOT NULL,
"timezone" varchar(60) NOT NULL
);

View File

@ -580,3 +580,238 @@ treport_custom_sql_insert(4, 'Group&#x20;view','&lt;&#x20;&#40;select&#x20;count
COMMIT;
END;;
-- ttimezone Data
BEGIN
LOCK TABLE ttimezone IN EXCLUSIVE MODE;
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Abidjan');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Accra');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Addis_Ababa');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Algiers');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Asmara');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Asmera');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Bamako');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Bangui');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Banjul');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Bissau');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Blantyre');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa','Africa/Brazzaville');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Bujumbura');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Cairo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Casablanca');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Ceuta');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Conakry');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Dakar');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Dar_es_Salaam');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Djibouti');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Douala');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/El_Aaiun');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Freetown');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Gaborone');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Harare');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Johannesburg');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Juba');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Kampala');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Khartoum');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Kigali');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Kinshasa');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lagos');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Libreville');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lome');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Luanda');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lubumbashi');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Lusaka');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Malabo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Maputo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Maseru');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Mbabane');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Mogadishu');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Monrovia');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Nairobi');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Ndjamena');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Niamey');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Nouakchott');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Ouagadougou');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Porto-Novo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Sao_Tome');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Timbuktu');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Tripoli');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Tunis');
INSERT INTO ttimezone (zone, timezone) VALUES ('Africa', 'Africa/Windhoek');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Adak');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Anchorage');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Anguilla');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Antigua');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Araguaina');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Buenos_Aires');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Catamarca');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/ComodRivadavia');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Cordoba');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Jujuy');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/La_Rioja');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Mendoza');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Rio_Gallegos');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Salta');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/San_Juan');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/San_Luis');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Tucuman');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Argentina/Ushuaia');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Aruba');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Asuncion');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Atikokan');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Atka');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Bahia');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Bahia_Banderas');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Barbados');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Belem');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Belize');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Blanc-Sablon');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Boa_Vista');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Bogota');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Boise');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Buenos_Aires');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cambridge_Bay');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Campo_Grande');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cancun');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Caracas');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Catamarca');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cayenne');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cayman');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Chicago');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Chihuahua');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Coral_Harbour');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cordoba');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Costa_Rica');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Cuiaba');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/New_York');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Vancouver');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Toronto');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Phoenix');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Monterrey');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Panama');
INSERT INTO ttimezone (zone, timezone) VALUES ('America', 'America/Puerto_Rico');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Casey');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Davis');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/DumontDUrville');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Macquarie');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Mawson');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/McMurdo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Palmer');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Rothera');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/South_Pole');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Syowa');
INSERT INTO ttimezone (zone, timezone) VALUES ('Antarctica', 'Antarctica/Vostok');
INSERT INTO ttimezone (zone, timezone) VALUES ('Arctic', 'Arctic/Longyearbyen');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Aden');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Almaty');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Amman');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Anadyr');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Aqtau');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Aqtobe');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Ashgabat');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Ashkhabad');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Baghdad');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Bahrain');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Baku');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Bangkok');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Beirut');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Bishkek');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Brunei');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Calcutta');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Choibalsan');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Chongqing');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Chungking');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Colombo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dacca');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Damascus');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dhaka');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dili');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dubai');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Dushanbe');
INSERT INTO ttimezone (zone, timezone) VALUES ('Asia', 'Asia/Gaza');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Azores');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Bermuda');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Canary');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Cape_Verde');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Faeroe');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Faroe');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Jan_Mayen');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Madeira');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Reykjavik');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/South_Georgia');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/St_Helena');
INSERT INTO ttimezone (zone, timezone) VALUES ('Atlantic', 'Atlantic/Stanley');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/ACT');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Adelaide');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Brisbane');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Broken_Hill');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Canberra');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Currie');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Darwin');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Eucla');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Hobart');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/LHI');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Lindeman');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Lord_Howe');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Melbourne');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/North');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/NSW');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Perth');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Queensland');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/South');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Sydney');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Tasmania');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Victoria');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/West');
INSERT INTO ttimezone (zone, timezone) VALUES ('Australia', 'Australia/Yancowinna');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Amsterdam');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Andorra');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Athens');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Belfast');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Belgrade');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Berlin');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Bratislava');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Brussels');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Bucharest');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Budapest');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Chisinau');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Copenhagen');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Dublin');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Gibraltar');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Guernsey');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Helsinki');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Isle_of_Man');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Istanbul');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Jersey');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Kaliningrad');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Kiev');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Lisbon');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Ljubljana');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/London');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Luxembourg');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Madrid');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Malta');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Mariehamn');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Minsk');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Monaco');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Moscow');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Nicosia');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Oslo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Paris');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Podgorica');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Prague');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Riga');
INSERT INTO ttimezone (zone, timezone) VALUES ('Europe', 'Europe/Rome');
INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Antananarivo');
INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Chagos');
INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Christmas');
INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Cocos');
INSERT INTO ttimezone (zone, timezone) VALUES ('Indian', 'Indian/Comoro');
INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Apia');
INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Auckland');
INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Chatham');
INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Chuuk');
INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Easter');
INSERT INTO ttimezone (zone, timezone) VALUES ('Pacific', 'Pacific/Efate');
COMMIT;
END;;

View File

@ -420,3 +420,238 @@ INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (2, 'Monitoring&#x
INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (3, 'Monitoring&#x20;Report&#x20;Alerts', 'select&#x20;t1.nombre&#x20;as&#x20;agent_name,&#x20;t2.nombre&#x20;as&#x20;module_name,&#x20;&#40;select&#x20;talert_templates.name&#x20;from&#x20;talert_templates&#x20;where&#x20;talert_templates.id&#x20;=&#x20;t3.id_alert_template&#41;&#x20;as&#x20;template,&#x20;&#40;select&#x20;group_concat&#40;t02.name&#41;&#x20;from&#x20;talert_template_module_actions&#x20;as&#x20;t01&#x20;inner&#x20;join&#x20;talert_actions&#x20;as&#x20;t02&#x20;on&#x20;t01.id_alert_action&#x20;=&#x20;t02.id&#x20;where&#x20;t01.id_alert_template_module&#x20;=&#x20;t3.id&#x20;group&#x20;by&#x20;t01.id_alert_template_module&#41;&#x20;as&#x20;actions&#x20;from&#x20;tagente&#x20;as&#x20;t1&#x20;inner&#x20;join&#x20;tagente_modulo&#x20;as&#x20;t2&#x20;on&#x20;t1.id_agente&#x20;=&#x20;t2.id_agente&#x20;inner&#x20;join&#x20;talert_template_modules&#x20;as&#x20;t3&#x20;on&#x20;t2.id_agente_modulo&#x20;=&#x20;t3.id_agent_module&#x20;order&#x20;by&#x20;agent_name,&#x20;module_name;');
INSERT INTO "treport_custom_sql" ("id", "name", "sql") VALUES (4, 'Group&#x20;view', 'select&#x20;t1.nombre,&#x20;&#40;select&#x20;count&#40;t3.id_agente&#41;&#x20;from&#x20;tagente&#x20;as&#x20;t3&#x20;where&#x20;t1.id_grupo&#x20;=&#x20;t3.id_grupo&#41;&#x20;as&#x20;agents,&#x20;&#40;SELECT&#x20;COUNT&#40;t4.id_agente&#41;&#x20;FROM&#x20;tagente&#x20;as&#x20;t4&#x20;WHERE&#x20;t4.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;t4.disabled&#x20;=&#x20;0&#x20;AND&#x20;t4.ultimo_contacto&#x20;&lt;&#x20;NOW&#40;&#41;&#x20;-&#x20;&#40;intervalo&#x20;/&#x20;&#40;1/2&#41;&#41;&#41;&#x20;as&#x20;agent_unknown,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.id_agente&#x20;=&#x20;tagente_estado.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;utimestamp&#x20;&gt;&#x20;0&#x20;AND&#x20;tagente_modulo.id_tipo_modulo&#x20;NOT&#x20;IN&#40;21,22,23,24,100&#41;&#x20;AND&#x20;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&gt;=&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#41;&#x20;as&#x20;monitor_unknow,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.id_agente&#x20;=&#x20;tagente_estado.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_modulo.id_tipo_modulo&#x20;NOT&#x20;IN&#x20;&#40;21,22,23,24&#41;&#x20;AND&#x20;utimestamp&#x20;=&#x20;0&#41;&#x20;as&#x20;monitor_no_init,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_estado.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;estado&#x20;=&#x20;0&#x20;AND&#x20;&#40;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&lt;&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24,100&#41;&#41;&#41;&#x20;AND&#x20;&#40;utimestamp&#x20;&gt;&#x20;0&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24&#41;&#41;&#41;&#41;&#x20;as&#x20;monitor_ok,&#x20;&#40;SELECT&#x20;COUNT&#40;tagente_estado.id_agente_estado&#41;&#x20;FROM&#x20;tagente_estado,&#x20;tagente,&#x20;tagente_modulo&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente_estado.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;estado&#x20;=&#x20;1&#x20;AND&#x20;&#40;&#40;UNIX_TIMESTAMP&#40;NOW&#40;&#41;&#41;&#x20;-&#x20;tagente_estado.utimestamp&#41;&#x20;&lt;&#x20;&#40;tagente_estado.current_interval&#x20;/&#x20;&#40;1/2&#41;&#41;&#x20;OR&#x20;&#40;tagente_modulo.id_tipo_modulo&#x20;IN&#40;21,22,23,24,100&#41;&#41;&#41;&#x20;AND&#x20;utimestamp&#x20;&gt;&#x20;0&#41;&#x20;as&#x20;monitor_critical,&#x20;&#40;SELECT&#x20;COUNT&#40;talert_template_modules.id&#41;&#x20;FROM&#x20;talert_template_modules,&#x20;tagente_modulo,&#x20;tagente_estado,&#x20;tagente&#x20;WHERE&#x20;tagente.id_grupo&#x20;=&#x20;t1.id_grupo&#x20;AND&#x20;tagente_modulo.id_agente&#x20;=&#x20;tagente.id_agente&#x20;AND&#x20;tagente_estado.id_agente_modulo&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;tagente_modulo.disabled&#x20;=&#x20;0&#x20;AND&#x20;tagente.disabled&#x20;=&#x20;0&#x20;AND&#x20;talert_template_modules.id_agent_module&#x20;=&#x20;tagente_modulo.id_agente_modulo&#x20;AND&#x20;times_fired&#x20;&gt;&#x20;0&#41;&#x20;as&#x20;monitor_alert_fired&#x20;from&#x20;tgrupo&#x20;as&#x20;t1&#x20;where&#x20;0&#x20;&lt;&#x20;&#40;select&#x20;count&#40;t2.id_agente&#41;&#x20;from&#x20;tagente&#x20;as&#x20;t2&#x20;where&#x20;t1.id_grupo&#x20;=&#x20;t2.id_grupo&#41;');
SELECT setval('treport_custom_sql_id_seq', (SELECT (SELECT MAX(id) FROM treport_custom_sql)));
BEGIN WORK;
LOCK TABLE "ttimezone";
INSERT INTO "ttimezone" ("zone", "timezone") VALUES
('Africa','Africa/Abidjan'),
('Africa','Africa/Accra'),
('Africa','Africa/Addis_Ababa'),
('Africa','Africa/Algiers'),
('Africa','Africa/Asmara'),
('Africa','Africa/Asmera'),
('Africa','Africa/Bamako'),
('Africa','Africa/Bangui'),
('Africa','Africa/Banjul'),
('Africa','Africa/Bissau'),
('Africa','Africa/Blantyre'),
('Africa','Africa/Brazzaville'),
('Africa', 'Africa/Bujumbura'),
('Africa', 'Africa/Cairo'),
('Africa', 'Africa/Casablanca'),
('Africa', 'Africa/Ceuta'),
('Africa', 'Africa/Conakry'),
('Africa', 'Africa/Dakar'),
('Africa', 'Africa/Dar_es_Salaam'),
('Africa', 'Africa/Djibouti'),
('Africa', 'Africa/Douala'),
('Africa', 'Africa/El_Aaiun'),
('Africa', 'Africa/Freetown'),
('Africa', 'Africa/Gaborone'),
('Africa', 'Africa/Harare'),
('Africa', 'Africa/Johannesburg'),
('Africa', 'Africa/Juba'),
('Africa', 'Africa/Kampala'),
('Africa', 'Africa/Khartoum'),
('Africa', 'Africa/Kigali'),
('Africa', 'Africa/Kinshasa'),
('Africa', 'Africa/Lagos'),
('Africa', 'Africa/Libreville'),
('Africa', 'Africa/Lome'),
('Africa', 'Africa/Luanda'),
('Africa', 'Africa/Lubumbashi'),
('Africa', 'Africa/Lusaka'),
('Africa', 'Africa/Malabo'),
('Africa', 'Africa/Maputo'),
('Africa', 'Africa/Maseru'),
('Africa', 'Africa/Mbabane'),
('Africa', 'Africa/Mogadishu'),
('Africa', 'Africa/Monrovia'),
('Africa', 'Africa/Nairobi'),
('Africa', 'Africa/Ndjamena'),
('Africa', 'Africa/Niamey'),
('Africa', 'Africa/Nouakchott'),
('Africa', 'Africa/Ouagadougou'),
('Africa', 'Africa/Porto-Novo'),
('Africa', 'Africa/Sao_Tome'),
('Africa', 'Africa/Timbuktu'),
('Africa', 'Africa/Tripoli'),
('Africa', 'Africa/Tunis'),
('Africa', 'Africa/Windhoek'),
('America', 'America/Adak'),
('America', 'America/Anchorage'),
('America', 'America/Anguilla'),
('America', 'America/Antigua'),
('America', 'America/Araguaina'),
('America', 'America/Argentina/Buenos_Aires'),
('America', 'America/Argentina/Catamarca'),
('America', 'America/Argentina/ComodRivadavia'),
('America', 'America/Argentina/Cordoba'),
('America', 'America/Argentina/Jujuy'),
('America', 'America/Argentina/La_Rioja'),
('America', 'America/Argentina/Mendoza'),
('America', 'America/Argentina/Rio_Gallegos'),
('America', 'America/Argentina/Salta'),
('America', 'America/Argentina/San_Juan'),
('America', 'America/Argentina/San_Luis'),
('America', 'America/Argentina/Tucuman'),
('America', 'America/Argentina/Ushuaia'),
('America', 'America/Aruba'),
('America', 'America/Asuncion'),
('America', 'America/Atikokan'),
('America', 'America/Atka'),
('America', 'America/Bahia'),
('America', 'America/Bahia_Banderas'),
('America', 'America/Barbados'),
('America', 'America/Belem'),
('America', 'America/Belize'),
('America', 'America/Blanc-Sablon'),
('America', 'America/Boa_Vista'),
('America', 'America/Bogota'),
('America', 'America/Boise'),
('America', 'America/Buenos_Aires'),
('America', 'America/Cambridge_Bay'),
('America', 'America/Campo_Grande'),
('America', 'America/Cancun'),
('America', 'America/Caracas'),
('America', 'America/Catamarca'),
('America', 'America/Cayenne'),
('America', 'America/Cayman'),
('America', 'America/Chicago'),
('America', 'America/Chihuahua'),
('America', 'America/Coral_Harbour'),
('America', 'America/Cordoba'),
('America', 'America/Costa_Rica'),
('America', 'America/Cuiaba'),
('America', 'America/New_York'),
('America', 'America/Vancouver'),
('America', 'America/Toronto'),
('America', 'America/Phoenix'),
('America', 'America/Monterrey'),
('America', 'America/Panama'),
('America', 'America/Puerto_Rico'),
('Antarctica', 'Antarctica/Casey'),
('Antarctica', 'Antarctica/Davis'),
('Antarctica', 'Antarctica/DumontDUrville'),
('Antarctica', 'Antarctica/Macquarie'),
('Antarctica', 'Antarctica/Mawson'),
('Antarctica', 'Antarctica/McMurdo'),
('Antarctica', 'Antarctica/Palmer'),
('Antarctica', 'Antarctica/Rothera'),
('Antarctica', 'Antarctica/South_Pole'),
('Antarctica', 'Antarctica/Syowa'),
('Antarctica', 'Antarctica/Vostok'),
('Arctic', 'Arctic/Longyearbyen'),
('Asia', 'Asia/Aden'),
('Asia', 'Asia/Almaty'),
('Asia', 'Asia/Amman'),
('Asia', 'Asia/Anadyr'),
('Asia', 'Asia/Aqtau'),
('Asia', 'Asia/Aqtobe'),
('Asia', 'Asia/Ashgabat'),
('Asia', 'Asia/Ashkhabad'),
('Asia', 'Asia/Baghdad'),
('Asia', 'Asia/Bahrain'),
('Asia', 'Asia/Baku'),
('Asia', 'Asia/Bangkok'),
('Asia', 'Asia/Beirut'),
('Asia', 'Asia/Bishkek'),
('Asia', 'Asia/Brunei'),
('Asia', 'Asia/Calcutta'),
('Asia', 'Asia/Choibalsan'),
('Asia', 'Asia/Chongqing'),
('Asia', 'Asia/Chungking'),
('Asia', 'Asia/Colombo'),
('Asia', 'Asia/Dacca'),
('Asia', 'Asia/Damascus'),
('Asia', 'Asia/Dhaka'),
('Asia', 'Asia/Dili'),
('Asia', 'Asia/Dubai'),
('Asia', 'Asia/Dushanbe'),
('Asia', 'Asia/Gaza'),
('Atlantic', 'Atlantic/Azores'),
('Atlantic', 'Atlantic/Bermuda'),
('Atlantic', 'Atlantic/Canary'),
('Atlantic', 'Atlantic/Cape_Verde'),
('Atlantic', 'Atlantic/Faeroe'),
('Atlantic', 'Atlantic/Faroe'),
('Atlantic', 'Atlantic/Jan_Mayen'),
('Atlantic', 'Atlantic/Madeira'),
('Atlantic', 'Atlantic/Reykjavik'),
('Atlantic', 'Atlantic/South_Georgia'),
('Atlantic', 'Atlantic/St_Helena'),
('Atlantic', 'Atlantic/Stanley'),
('Australia', 'Australia/ACT'),
('Australia', 'Australia/Adelaide'),
('Australia', 'Australia/Brisbane'),
('Australia', 'Australia/Broken_Hill'),
('Australia', 'Australia/Canberra'),
('Australia', 'Australia/Currie'),
('Australia', 'Australia/Darwin'),
('Australia', 'Australia/Eucla'),
('Australia', 'Australia/Hobart'),
('Australia', 'Australia/LHI'),
('Australia', 'Australia/Lindeman'),
('Australia', 'Australia/Lord_Howe'),
('Australia', 'Australia/Melbourne'),
('Australia', 'Australia/North'),
('Australia', 'Australia/NSW'),
('Australia', 'Australia/Perth'),
('Australia', 'Australia/Queensland'),
('Australia', 'Australia/South'),
('Australia', 'Australia/Sydney'),
('Australia', 'Australia/Tasmania'),
('Australia', 'Australia/Victoria'),
('Australia', 'Australia/West'),
('Australia', 'Australia/Yancowinna'),
('Europe', 'Europe/Amsterdam'),
('Europe', 'Europe/Andorra'),
('Europe', 'Europe/Athens'),
('Europe', 'Europe/Belfast'),
('Europe', 'Europe/Belgrade'),
('Europe', 'Europe/Berlin'),
('Europe', 'Europe/Bratislava'),
('Europe', 'Europe/Brussels'),
('Europe', 'Europe/Bucharest'),
('Europe', 'Europe/Budapest'),
('Europe', 'Europe/Chisinau'),
('Europe', 'Europe/Copenhagen'),
('Europe', 'Europe/Dublin'),
('Europe', 'Europe/Gibraltar'),
('Europe', 'Europe/Guernsey'),
('Europe', 'Europe/Helsinki'),
('Europe', 'Europe/Isle_of_Man'),
('Europe', 'Europe/Istanbul'),
('Europe', 'Europe/Jersey'),
('Europe', 'Europe/Kaliningrad'),
('Europe', 'Europe/Kiev'),
('Europe', 'Europe/Lisbon'),
('Europe', 'Europe/Ljubljana'),
('Europe', 'Europe/London'),
('Europe', 'Europe/Luxembourg'),
('Europe', 'Europe/Madrid'),
('Europe', 'Europe/Malta'),
('Europe', 'Europe/Mariehamn'),
('Europe', 'Europe/Minsk'),
('Europe', 'Europe/Monaco'),
('Europe', 'Europe/Moscow'),
('Europe', 'Europe/Nicosia'),
('Europe', 'Europe/Oslo'),
('Europe', 'Europe/Paris'),
('Europe', 'Europe/Podgorica'),
('Europe', 'Europe/Prague'),
('Europe', 'Europe/Riga'),
('Europe', 'Europe/Rome'),
('Indian', 'Indian/Antananarivo'),
('Indian', 'Indian/Chagos'),
('Indian', 'Indian/Christmas'),
('Indian', 'Indian/Cocos'),
('Indian', 'Indian/Comoro'),
('Pacific', 'Pacific/Apia'),
('Pacific', 'Pacific/Auckland'),
('Pacific', 'Pacific/Chatham'),
('Pacific', 'Pacific/Chuuk'),
('Pacific', 'Pacific/Easter'),
('Pacific', 'Pacific/Efate');
COMMIT WORK;

View File

@ -1583,3 +1583,16 @@ CREATE TABLE tevent_filter (
tag VARCHAR2(600) default '' NOT NULL,
filter_only_alert NUMBER(10, 0) default -1 NOT NULL
);
-- -----------------------------------------------------
-- Table `ttimezone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS ttimezone (
id_tz NUMBER(10,0) NOT NULL PRIMARY KEY,
zone VARCHAR2(60) NOT NULL,
timezone VARCHAR2(60) NOT NULL
);
CREATE SEQUENCE ttimezone_s INCREMENT BY 1 START WITH 1;
CREATE OR REPLACE TRIGGER ttimezone_inc BEFORE INSERT ON ttimezone REFERENCING NEW AS NEW FOR EACH ROW BEGIN SELECT ttimezone_s.nextval INTO :NEW.ID_TZ FROM dual; END ttimezone_inc;;

View File

@ -1282,4 +1282,12 @@ CREATE TABLE "tevent_filter" (
"filter_only_alert" INTEGER NOT NULL default -1
);
-- -----------------------------------------------------
-- Table `ttimezone`
-- -----------------------------------------------------
CREATE TABLE IF NOT EXISTS "ttimezone" (
"id_tz" INTEGER NOT NULL PRIMARY KEY,
"zone" varchar(60) NOT NULL,
"timezone" varchar(60) NOT NULL
);