2012-02-22 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
* pandoradb.sql pandoradb.postgreSQL.sql pandoradb.oracle.sql extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: Added fields id_template to treport and foreign key to treport_content_item to propagate delete over report tables. git-svn-id: https://svn.code.sf.net/p/pandora/code/trunk@5633 c3f86ba8-e40f-0410-aaad-9ba5e7f4b01f
This commit is contained in:
parent
0ea8c7e582
commit
f141df7752
|
@ -1,3 +1,14 @@
|
|||
2012-02-22 Juan Manuel Ramon <juanmanuel.ramon@artica.es>
|
||||
|
||||
* pandoradb.sql
|
||||
pandoradb.postgreSQL.sql
|
||||
pandoradb.oracle.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.mysql.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.oracle.sql
|
||||
extras/pandoradb_migrate_4.0.x_to_4.1.postgreSQL.sql: Added fields
|
||||
id_template to treport and foreign key to treport_content_item to
|
||||
propagate delete over report tables.
|
||||
|
||||
2012-02-22 Miguel de Dios <miguel.dedios@artica.es>
|
||||
|
||||
* install.php, index.php, include/functions_ui.php: cleaned source code
|
||||
|
|
|
@ -190,3 +190,12 @@ CREATE TABLE IF NOT EXISTS `tgraph_source_template` (
|
|||
PRIMARY KEY(`id_gs_template`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE treport_content_item ADD FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`) ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE treport ADD COLUMN `id_template` INTEGER UNSIGNED DEFAULT 0;
|
||||
|
|
|
@ -182,3 +182,13 @@ CREATE tgraph_source_template (
|
|||
);
|
||||
|
||||
CREATE SEQUENCE tgraph_source_template_s INCREMENT BY 1 START WITH 1;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE treport_content_item ADD FOREIGN KEY (id_report_content) REFERENCES treport_content(id_rc) ON DELETE CASCADE;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE treport ADD (id_template NUMBER(10, 0) default 0 NOT NULL);
|
||||
|
|
|
@ -167,3 +167,13 @@ CREATE TABLE IF NOT EXISTS "tgraph_source_template" (
|
|||
"weight" DOUBLE PRECISION default 2.0,
|
||||
"exact_match" SMALLINT NOT NULL default 0
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport_content_item`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE treport_content_item ADD FOREIGN KEY("id_report_content") REFERENCES treport_content("id_rc") ON UPDATE CASCADE ON DELETE CASCADE;
|
||||
|
||||
-- -----------------------------------------------------
|
||||
-- Table `treport`
|
||||
-- -----------------------------------------------------
|
||||
ALTER TABLE "treport" ADD COLUMN "id_template" INTEGER NOT NULL default 0;
|
||||
|
|
|
@ -936,7 +936,8 @@ CREATE TABLE treport (
|
|||
header CLOB default NULL,
|
||||
first_page CLOB default NULL,
|
||||
footer CLOB default NULL,
|
||||
custom_font VARCHAR2(200) default NULL
|
||||
custom_font VARCHAR2(200) default NULL,
|
||||
id_template NUMBER(10, 0) default 0 NOT NULL
|
||||
);
|
||||
|
||||
CREATE SEQUENCE treport_s INCREMENT BY 1 START WITH 1;
|
||||
|
@ -1015,7 +1016,7 @@ CREATE OR REPLACE TRIGGER treport_cont_sla_comb_update AFTER UPDATE OF ID_RC ON
|
|||
|
||||
CREATE TABLE treport_content_item (
|
||||
id NUMBER(10, 0) NOT NULL PRIMARY KEY,
|
||||
id_report_content NUMBER(10, 0) NOT NULL,
|
||||
id_report_content NUMBER(10, 0) NOT NULL REFERENCES treport_content(id_rc) ON DELETE CASCADE,
|
||||
id_agent_module NUMBER(10, 0) NOT NULL,
|
||||
server_name CLOB default ''
|
||||
);
|
||||
|
|
|
@ -750,7 +750,8 @@ CREATE TABLE "treport" (
|
|||
"header" TEXT default NULL,
|
||||
"first_page" TEXT default NULL,
|
||||
"footer" TEXT default NULL,
|
||||
"custom_font" varchar(200) default NULL
|
||||
"custom_font" varchar(200) default NULL,
|
||||
"id_template" BIGINT NOT NULL default 0
|
||||
);
|
||||
|
||||
-- -----------------------------------------------------
|
||||
|
@ -808,7 +809,7 @@ CREATE TABLE "treport_content_sla_combined" (
|
|||
|
||||
CREATE TABLE "treport_content_item" (
|
||||
"id" SERIAL NOT NULL PRIMARY KEY,
|
||||
"id_report_content" INTEGER NOT NULL,
|
||||
"id_report_content" INTEGER NOT NULL REFERENCES treport_content("id_rc") ON UPDATE CASCADE ON DELETE CASCADE,
|
||||
"id_agent_module" INTEGER NOT NULL,
|
||||
"server_name" TEXT DEFAULT ''
|
||||
);
|
||||
|
|
|
@ -832,7 +832,7 @@ CREATE TABLE IF NOT EXISTS `treport` (
|
|||
`first_page` MEDIUMTEXT default NULL,
|
||||
`footer` MEDIUMTEXT default NULL,
|
||||
`custom_font` varchar(200) default NULL,
|
||||
|
||||
`id_template` INTEGER UNSIGNED DEFAULT 0,
|
||||
PRIMARY KEY(`id_report`)
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
@ -900,7 +900,9 @@ CREATE TABLE IF NOT EXISTS `treport_content_item` (
|
|||
`id_report_content` INTEGER UNSIGNED NOT NULL,
|
||||
`id_agent_module` int(10) unsigned NOT NULL,
|
||||
`server_name` text default '',
|
||||
PRIMARY KEY(`id`)
|
||||
PRIMARY KEY(`id`),
|
||||
FOREIGN KEY (`id_report_content`) REFERENCES treport_content(`id_rc`)
|
||||
ON UPDATE CASCADE ON DELETE CASCADE
|
||||
) ENGINE = InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS `treport_custom_sql` (
|
||||
|
|
Loading…
Reference in New Issue