2018-02-19 11:50:14 +00:00
|
|
|
ALTER TABLE `vn2008`.`Articles_nicho`
|
|
|
|
DROP FOREIGN KEY `Articles_nichos_fk`;
|
|
|
|
ALTER TABLE `vn2008`.`Articles_nicho`
|
|
|
|
CHANGE COLUMN `Id_Article` `Id_Article` INT(11) NOT NULL ,
|
|
|
|
ADD COLUMN `id` INT NOT NULL AUTO_INCREMENT AFTER `modificationDate`,
|
|
|
|
DROP PRIMARY KEY,
|
|
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
ALTER TABLE `vn2008`.`Articles_nicho`
|
|
|
|
ADD CONSTRAINT `Articles_nichos_fk`
|
|
|
|
FOREIGN KEY (`Id_Article`)
|
|
|
|
REFERENCES `vn2008`.`Articles` (`Id_Article`)
|
|
|
|
ON DELETE CASCADE
|
|
|
|
ON UPDATE CASCADE;
|
2018-02-19 12:21:15 +00:00
|
|
|
|
|
|
|
|
|
|
|
|