From e0f8b92b861078c59a36ee5e79ad9db216b00aaf Mon Sep 17 00:00:00 2001 From: jsatoh Date: Fri, 22 Mar 2013 01:23:28 +0000 Subject: [PATCH] 2013-03-22 Junichi Satoh * extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql: Fixed bad sql syntax. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@7877 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f --- pandora_console/ChangeLog | 5 ++++ ...doradb_migrate_4.0.x_to_5.0.postgreSQL.sql | 30 +++++++++---------- 2 files changed, 20 insertions(+), 15 deletions(-) diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 8c6ec17146..c54e19c76b 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2013-03-22 Junichi Satoh + + * extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql: Fixed bad + sql syntax. + 2013-03-21 Miguel de Dios * mobile/operation/groups.php, mobile/operation/tactical.php, diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql index c5b3ea2bf2..d5406184df 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_5.0.postgreSQL.sql @@ -166,17 +166,17 @@ ALTER TABLE "tgrupo" ADD COLUMN "contact" text; ALTER TABLE "tgrupo" ADD COLUMN "other" text; -- ----------------------------------------------------- --- Table ""talert_snmp"" +-- Table "talert_snmp" -- ----------------------------------------------------- -ALTER TABLE ""talert_snmp"" ADD COLUMN "_snmp_f1_" text DEFAULT ''; -ALTER TABLE ""talert_snmp"" ADD COLUMN "_snmp_f2_" text DEFAULT ''; -ALTER TABLE ""talert_snmp"" ADD COLUMN "_snmp_f3_" text DEFAULT ''; -ALTER TABLE ""talert_snmp"" ADD COLUMN "_snmp_f4_" text DEFAULT ''; -ALTER TABLE ""talert_snmp"" ADD COLUMN "_snmp_f5_" text DEFAULT ''; -ALTER TABLE ""talert_snmp"" ADD COLUMN "_snmp_f6_" text DEFAULT ''; -ALTER TABLE ""talert_snmp"" ADD COLUMN "trap_type" INTEGER NOT NULL DEFAULT '-1'; -ALTER TABLE ""talert_snmp"" ADD COLUMN "single_value" varchar(255) DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f1_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f2_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f3_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f4_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f5_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "_snmp_f6_" text DEFAULT ''; +ALTER TABLE "talert_snmp" ADD COLUMN "trap_type" INTEGER NOT NULL DEFAULT '-1'; +ALTER TABLE "talert_snmp" ADD COLUMN "single_value" varchar(255) DEFAULT ''; -- ----------------------------------------------------- -- Table "tagente_modulo" @@ -196,7 +196,7 @@ ALTER TABLE "tagente_modulo" ADD COLUMN "max_retries" INTEGER default 0; ALTER TABLE "tagente_modulo" ADD COLUMN "id_category" INTEGER default 0; -- Move the number of retries for web modules from plugin_pass to max_retries -UPDATE "tagente_modulo" SET max_retries=plugin_pass WHERE id_modulo=7; +UPDATE "tagente_modulo" SET max_retries=CAST(plugin_pass AS INT) WHERE id_modulo=7; -- ----------------------------------------------------- -- Table "tevent_filter" @@ -317,7 +317,7 @@ CREATE TABLE "tpassword_history" ( -- ----------------------------------------------------- -- Table "tconfig" -- ----------------------------------------------------- -UPDATE TABLE tconfig SET "value"='comparation' +UPDATE tconfig SET "value"='comparation' WHERE "token"='prominent_time'; -- ----------------------------------------------------- @@ -380,7 +380,7 @@ ALTER TABLE "tagente_estado" ADD COLUMN "last_error" INTEGER default 0; -- ----------------------------------------------------- -- Table "tevent_response" -- ----------------------------------------------------- -CREATE TABLE IF NOT EXISTS "tevent_response" ( +CREATE TABLE "tevent_response" ( "id" SERIAL NOT NULL PRIMARY KEY, "name" varchar(600) NOT NULL default '', "description" TEXT, @@ -390,7 +390,7 @@ CREATE TABLE IF NOT EXISTS "tevent_response" ( "modal_width" INTEGER NOT NULL DEFAULT 0, "modal_height" INTEGER NOT NULL DEFAULT 0, "new_window" INTEGER NOT NULL DEFAULT 0, - "params" TEXT, + "params" TEXT ); -- ---------------------------------------------------------------------- @@ -431,9 +431,9 @@ ALTER TABLE "talert_commands" ADD COLUMN "fields_values" TEXT; -- --------------------------------------------------------------------- -- Table "tcategory" -- --------------------------------------------------------------------- -CREATE TABLE IF NOT EXISTS "tcategory" ( +CREATE TABLE "tcategory" ( "id" SERIAL NOT NULL PRIMARY KEY, - "name" varchar(600) NOT NULL default '', + "name" varchar(600) NOT NULL default '' ); -- ----------------------------------------------------------------------