03/02/2010, 14:02
|
| | Fecha de Ingreso: enero-2010
Mensajes: 152
Antigüedad: 14 años, 9 meses Puntos: 0 | |
Respuesta: Cannot delete or update a parent row: a foreign key constraint fails esto?
+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| Table | Create Table |
+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+
| maquina | CREATE TABLE `maquina` (
`idMaquina` int(11) NOT NULL auto_increment,
`hostname` varchar(100) default NULL,
`ipHost` text,
`serialNumber` varchar(100) default NULL,
`memRAM` varchar(100) default NULL,
`fileSystem` text,
`version` text,
`usuarioMaq` text,
`fila` char(1) default NULL,
`modulo` char(1) default NULL,
`rack` int(2) default NULL,
`instalacion` date default NULL,
`expiracion` date default NULL,
`idModeloMaquina` int(11) default NULL,
`idAreaMaquina` int(2) default NULL,
`idProveedor` int(2) default NULL,
`idOS` int(11) default NULL,
`idCPU` int(11) default NULL,
`idEstado` int(2) default NULL,
PRIMARY KEY (`idMaquina`),
UNIQUE KEY `hostname` (`hostname`),
KEY `idModeloMaquina` (`idModeloMaquina`),
KEY `idAreaMaquina` (`idAreaMaquina`),
KEY `idProveedor` (`idProveedor`),
KEY `idOS` (`idOS`),
KEY `idCPU` (`idCPU`),
KEY `idEstado` (`idEstado`),
CONSTRAINT `maquina_ibfk_1` FOREIGN KEY (`idModeloMaquina`) REFERENCES `modeloMaquina` (`idModeloMaquina`),
CONSTRAINT `maquina_ibfk_2` FOREIGN KEY (`idAreaMaquina`) REFERENCES `areaMaquina` (`idAreaMaquina`),
CONSTRAINT `maquina_ibfk_3` FOREIGN KEY (`idProveedor`) REFERENCES `proveedor` (`idProveedor`),
CONSTRAINT `maquina_ibfk_4` FOREIGN KEY (`idOS`) REFERENCES `os` (`idOS`),
CONSTRAINT `maquina_ibfk_5` FOREIGN KEY (`idCPU`) REFERENCES `cpu` (`idCPU`),
CONSTRAINT `maquina_ibfk_6` FOREIGN KEY (`idEstado`) REFERENCES `estado` (`idEstado`)
) ENGINE=InnoDB AUTO_INCREMENT=500 DEFAULT CHARSET=latin1 |
+---------+-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------+ |