16 lines
477 B
SQL
16 lines
477 B
SQL
ALTER TABLE `vn2008`.`clientes_gestdoc`
|
|
DROP FOREIGN KEY `clientes_gestdoc_ibfk_3`;
|
|
ALTER TABLE `vn2008`.`clientes_gestdoc`
|
|
DROP PRIMARY KEY,
|
|
ADD PRIMARY KEY (`gest_doc_id`);
|
|
|
|
ALTER TABLE `vn2008`.`clientes_gestdoc`
|
|
ADD INDEX `fk_clientes_gestdoc_1_idx` (`Id_Cliente` ASC);
|
|
|
|
ALTER TABLE `vn2008`.`clientes_gestdoc`
|
|
ADD CONSTRAINT `fk_clientes_gestdoc_3`
|
|
FOREIGN KEY (`Id_Cliente`)
|
|
REFERENCES `vn2008`.`Clientes` (`id_cliente`)
|
|
ON DELETE RESTRICT
|
|
ON UPDATE CASCADE;
|