I did this:
ALTER TABLE `db`.`my_table`
ADD CONSTRAINT FOREIGN KEY (`my_second_table_id`)
REFERENCES `my_second_table` (`id`);
I should have done this:
ALTER TABLE `db`.`my_table`
ADD CONSTRAINT FOREIGN KEY (`my_second_table_id`)
REFERENCES `my_second_table` (`id`)
ON DELETE SET NULL;
Is it possible to ALTER this, or do I have to drop the constraint and add again?