diff --git a/pandora_console/ChangeLog b/pandora_console/ChangeLog index 98625fabad..6fccc9dd42 100644 --- a/pandora_console/ChangeLog +++ b/pandora_console/ChangeLog @@ -1,3 +1,8 @@ +2012-03-25 Junichi Satoh + + * extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql, + pandoradb.postgreSQL.sql: Fixed bad sql syntaxes. + 2012-03-25 Junichi Satoh * include/db/postgresql.php: Fixed bad syntax for WHERE clause in diff --git a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql index 52be1f8d12..b855d8de5f 100644 --- a/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql +++ b/pandora_console/extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql @@ -50,7 +50,7 @@ CREATE TABLE "tnetflow_report_content" ( -- Table `tincidencia` -- ----------------------------------------------------- -ALTER TABLE "tincidencia" ADD COLUMN "id_agent" INTEGER(10) NULL DEFAULT 0; +ALTER TABLE "tincidencia" ADD COLUMN "id_agent" INTEGER NULL DEFAULT 0; -- ----------------------------------------------------- -- Table `tagente` @@ -65,7 +65,7 @@ ALTER TABLE "tagente" ADD COLUMN "url_address" text NULL default ''; CREATE TYPE type_talert_special_days_same_day AS ENUM ('monday','tuesday','wednesday','thursday','friday','saturday','sunday'); CREATE TABLE "talert_special_days" ( "id" SERIAL NOT NULL PRIMARY KEY, - "date" DATE NOT NULL default '0000-00-00', + "date" DATE NOT NULL default '0001-01-01', "same_day" type_talert_special_days_same_day NOT NULL default 'sunday', "description" TEXT ); @@ -167,9 +167,9 @@ ALTER TABLE "tusuario" ADD COLUMN "shortcut_data" text default ''; -- ----------------------------------------------------- -- Table `tusuario` -- ----------------------------------------------------- -ALTER TABLE "tusuario" ADD COLUMN "section" varchar(255) NOT NULL; +ALTER TABLE "tusuario" ADD COLUMN "section" varchar(255) NOT NULL DEFAULT ''; -ALTER TABLE "tusuario" ADD COLUMN "data_section" varchar(255) NOT NULL; +ALTER TABLE "tusuario" ADD COLUMN "data_section" varchar(255) NOT NULL DEFAULT ''; -- ----------------------------------------------------- -- Table `treport_content_item` diff --git a/pandora_console/pandoradb.postgreSQL.sql b/pandora_console/pandoradb.postgreSQL.sql index f1148ab439..d58e1acc4d 100644 --- a/pandora_console/pandoradb.postgreSQL.sql +++ b/pandora_console/pandoradb.postgreSQL.sql @@ -355,7 +355,7 @@ CREATE TABLE "talert_compound_actions" ( CREATE TYPE type_talert_special_days_same_day AS ENUM ('monday','tuesday','wednesday','thursday','friday','saturday','sunday'); CREATE TABLE "talert_special_days" ( "id" SERIAL NOT NULL PRIMARY KEY, - "date" DATE NOT NULL default '0000-00-00', + "date" DATE NOT NULL default '0001-01-01', "same_day" type_talert_special_days_same_day NOT NULL default 'sunday', "description" TEXT ); @@ -442,7 +442,7 @@ CREATE TABLE "tincidencia" ( "id_lastupdate" varchar(60) default NULL, "id_agente_modulo" BIGINT NOT NULL, "notify_email" INTEGER NOT NULL default 0, - "id_agent" INTEGER(10) NULL default 0 + "id_agent" INTEGER NULL default 0 ); CREATE INDEX "tincidencia_id_1_idx" ON "tincidencia"("id_usuario","id_incidencia"); CREATE INDEX "tincidencia_id_agente_modulo_idx" ON "tincidencia"("id_agente_modulo"); @@ -700,8 +700,8 @@ CREATE TABLE "tusuario" ( "disabled" INTEGER NOT NULL default 1, "shortcut" SMALLINT DEFAULT 0, "shortcut_data" text default '', - "section" varchar(255) NOT NULL, - "data_section" varchar(255) NOT NULL + "section" varchar(255) NOT NULL DEFAULT '', + "data_section" varchar(255) NOT NULL DEFAULT '' ); CREATE TABLE "tusuario_perfil" (