WIP: Changes with PEN tables
This commit is contained in:
parent
85765099ea
commit
dc55ca5eff
|
@ -35,16 +35,30 @@ CREATE TABLE `tdiscovery_tmp_connections` (
|
|||
REFERENCES `tdiscovery_tmp_agents` (`id`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- New table `tpen`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE `tpen` (
|
||||
`pen` int(10) unsigned NOT NULL,
|
||||
`manufacturer` TEXT,
|
||||
`description` TEXT,
|
||||
`id_np` int(10) unsigned,
|
||||
PRIMARY KEY (`pen`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- New table `tnetwork_profile_pen`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile_pen` (
|
||||
`pen` int(10) unsigned NOT NULL,
|
||||
`id_np` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`pen`),
|
||||
CONSTRAINT `fk_np_id` FOREIGN KEY (`id_np`)
|
||||
CONSTRAINT `fk_network_profile_pen_pen` FOREIGN KEY (`pen`)
|
||||
REFERENCES `tpen` (`pen`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
CONSTRAINT `fk_network_profile_pen_id_np` FOREIGN KEY (`id_np`)
|
||||
REFERENCES `tnetwork_profile` (`id_np`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
|
||||
ALTER TABLE `twidget_dashboard` ADD COLUMN `position` TEXT NOT NULL default '';
|
||||
|
||||
ALTER TABLE `tagente_estado` ADD COLUMN `last_status_change` bigint(20) NOT NULL default '0';
|
||||
|
|
|
@ -1476,6 +1476,19 @@ ALTER TABLE tnetwork_component ADD COLUMN `dynamic_two_tailed` tinyint(1) unsign
|
|||
ALTER TABLE `tnetwork_component` ADD COLUMN `ff_type` tinyint(1) unsigned default '0';
|
||||
ALTER TABLE `tnetwork_component` MODIFY COLUMN `ff_type` tinyint(1) unsigned NULL DEFAULT '0';
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tnetwork_profile_pen`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile_pen` (
|
||||
`pen` int(10) unsigned NOT NULL,
|
||||
`id_np` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`pen`),
|
||||
CONSTRAINT `fk_network_profile_pen_pen` FOREIGN KEY (`pen`)
|
||||
REFERENCES `tpen` (`pen`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
CONSTRAINT `fk_network_profile_pen_id_np` FOREIGN KEY (`id_np`)
|
||||
REFERENCES `tnetwork_profile` (`id_np`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tpen`
|
||||
-- ----------------------------------------------------------------------
|
||||
|
@ -1483,10 +1496,7 @@ CREATE TABLE IF NOT EXISTS `tpen` (
|
|||
`pen` int(10) unsigned NOT NULL,
|
||||
`manufacturer` TEXT,
|
||||
`description` TEXT,
|
||||
`id_np` int(10) unsigned,
|
||||
PRIMARY KEY (`pen`),
|
||||
CONSTRAINT `fk_np_id` FOREIGN KEY (`id_np`)
|
||||
REFERENCES `tnetwork_profile` (`id_np`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
PRIMARY KEY (`pen`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ---------------------------------------------------------------------
|
||||
|
|
|
@ -953,6 +953,19 @@ CREATE TABLE IF NOT EXISTS `tnetwork_profile_component` (
|
|||
KEY `id_np` (`id_np`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tnetwork_profile_pen`
|
||||
-- ----------------------------------------------------------------------
|
||||
CREATE TABLE IF NOT EXISTS `tnetwork_profile_pen` (
|
||||
`pen` int(10) unsigned NOT NULL,
|
||||
`id_np` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`pen`),
|
||||
CONSTRAINT `fk_network_profile_pen_pen` FOREIGN KEY (`pen`)
|
||||
REFERENCES `tpen` (`pen`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
CONSTRAINT `fk_network_profile_pen_id_np` FOREIGN KEY (`id_np`)
|
||||
REFERENCES `tnetwork_profile` (`id_np`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
-- Table `tpen`
|
||||
-- ----------------------------------------------------------------------
|
||||
|
@ -960,10 +973,7 @@ CREATE TABLE IF NOT EXISTS `tpen` (
|
|||
`pen` int(10) unsigned NOT NULL,
|
||||
`manufacturer` TEXT,
|
||||
`description` TEXT,
|
||||
`id_np` int(10) unsigned,
|
||||
PRIMARY KEY (`pen`),
|
||||
CONSTRAINT `fk_np_id` FOREIGN KEY (`id_np`)
|
||||
REFERENCES `tnetwork_profile` (`id_np`) ON DELETE CASCADE ON UPDATE CASCADE
|
||||
PRIMARY KEY (`pen`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
-- ----------------------------------------------------------------------
|
||||
|
|
Loading…
Reference in New Issue