13 lines
336 B
SQL
13 lines
336 B
SQL
ALTER TABLE `vn2008`.`cl_est`
|
|
ADD COLUMN `roleFk` INT(10) UNSIGNED NOT NULL DEFAULT '1' AFTER `estado`;
|
|
|
|
ALTER TABLE `vn2008`.`cl_est`
|
|
ADD INDEX `roleFgn_idx` (`roleFk` ASC);
|
|
|
|
ALTER TABLE `vn2008`.`cl_est`
|
|
ADD CONSTRAINT `roleFgn`
|
|
FOREIGN KEY (`roleFk`)
|
|
REFERENCES `account`.`role` (`id`)
|
|
ON DELETE RESTRICT
|
|
ON UPDATE CASCADE;
|