17 lines
491 B
SQL
17 lines
491 B
SQL
ALTER TABLE `vn`.`itemLog`
|
|
CHANGE COLUMN `id` `id` INT(11) NOT NULL AUTO_INCREMENT ,
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
|
|
ALTER TABLE `vn`.`itemLog`
|
|
DROP FOREIGN KEY `itemLogUserFk`;
|
|
ALTER TABLE `vn`.`itemLog`
|
|
CHANGE COLUMN `id` `id` INT(11) NOT NULL AUTO_INCREMENT ,
|
|
CHANGE COLUMN `userFk` `userFk` INT(10) UNSIGNED NULL DEFAULT NULL ;
|
|
ALTER TABLE `vn`.`itemLog`
|
|
ADD CONSTRAINT `itemLogUserFk`
|
|
FOREIGN KEY (`userFk`)
|
|
REFERENCES `account`.`user` (`id`)
|
|
ON DELETE CASCADE
|
|
ON UPDATE CASCADE;
|