What does ON UPDATE RESTRICT do?
MysqlDatabaseDatabase DesignMysql Problem Overview
...
user_id INTEGER NOT NULL,
CONSTRAINT fk_user_meta FOREIGN KEY (user_id)
REFERENCES users (id) ON DELETE CASCADE ON UPDATE RESTRICT
I know from here that ON DELETE CASCADE means that if I delete a row from the users table, then the associated row from the user meta table will be removed too. But what does ON UPDATE RESTRICT do?
Mysql Solutions
Solution 1 - Mysql
RESTRICT
prevents the action from happening if there's any foreign keys that rely on the field that's being changed.