task/3382: Fix foreign key for table note.

This commit is contained in:
Tom Zhao 2024-06-19 11:53:37 +02:00
parent d92adb281f
commit 296036ad33

@ -521,6 +521,18 @@ alter table `user_program`
alter table `user_program`
add constraint fk_user_program_user_id
foreign key (user_id)
references user(id)
on delete cascade
on update cascade;
-- table note
alter table `note` drop foreign key `note_ibfk_1`;
alter table `note` drop key `user_id`;
alter table `note`
add constraint fk_note_user_id
foreign key (user_id)
references user(id)
on delete cascade