ALTER TABLE alarms ADD COLUMN note_id INT NULL, ADD CONSTRAINT fk_note_id FOREIGN KEY (note_id) REFERENCES notes(id) ON DELETE CASCADE;