Whenever I try to set foreign key constraint to "NO ACTION" MySQL workbench automatically sets it to "RESTRICT"

Viewed 350

I am trying to set a foreign key to constraint for on delete and on update to "NO ACTION", but for some reason after I apply the changes MySQL workbench changes it back to "RESTRICTED" on its own, I don't know why it's doing that.

This is the code MySQL Workbench generates when I try to change the constraints for on update and on delete to "NO ACTION"

ALTER TABLE `forums`.`post_replies` 
DROP FOREIGN KEY `fk_post_replies_users`;
ALTER TABLE `forums`.`post_replies` 
ADD CONSTRAINT `fk_post_replies_users`
  FOREIGN KEY (`user_id`)
  REFERENCES `forums`.`users` (`id`)
  ON DELETE NO ACTION
  ON UPDATE NO ACTION;
1 Answers

NO ACTION and RESTRICT are synonyms.

"13.1.20.5 FOREIGN KEY Constraints":

NO ACTION: A keyword from standard SQL. In MySQL, equivalent to RESTRICT.

Workbench seems to just pick to display RESTRICT over NO ACTION (well, it has to chose one and chooses the MySQL specific one...). But it doesn't mean anything different.

Related