18 lines
659 B
SQL
18 lines
659 B
SQL
ALTER TABLE `vn2008`.`Colas`
|
|
DROP FOREIGN KEY `Colas_ibfk_1`,
|
|
DROP FOREIGN KEY `Colas_ibfk_2`,
|
|
DROP FOREIGN KEY `Colas_ibfk_3`,
|
|
DROP FOREIGN KEY `Colas_ibfk_5`;
|
|
ALTER TABLE `vn2008`.`Colas`
|
|
CHANGE COLUMN `Id_Impresora` `Id_Impresora` TINYINT(3) UNSIGNED NULL DEFAULT NULL ,
|
|
CHANGE COLUMN `Id_Prioridad` `Id_Prioridad` TINYINT(3) UNSIGNED NULL DEFAULT NULL ;
|
|
ALTER TABLE `vn2008`.`Colas`
|
|
ADD CONSTRAINT `Colas_ibfk_4`
|
|
FOREIGN KEY (`Id_Impresora`)
|
|
REFERENCES `vn2008`.`Impresoras` (`Id_Impresora`)
|
|
ON UPDATE CASCADE,
|
|
ADD CONSTRAINT `Colas_ibfk_3`
|
|
FOREIGN KEY (`Id_Prioridad`)
|
|
REFERENCES `vn2008`.`Prioridades` (`Id_Prioridad`)
|
|
ON UPDATE CASCADE;
|