alter foreign key of the table code example
Example: alter table add foreign key mysql
ALTER TABLE orders
ADD
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;
ALTER TABLE orders
ADD
FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE;