db: explicit add of delete restrict

This commit is contained in:
Shawn Kwang 2018-10-25 10:19:43 -05:00
parent 953dd4757e
commit 096fde11cf
2 changed files with 5 additions and 2 deletions

View File

@ -193,7 +193,9 @@ alter table consent
alter table consent
add foreign key(consent_type_id)
references consent_type(id)
on update cascade;
on update cascade
on delete restrict;
-- explicit delete restrict on this foreign key
alter table consent_type
add index consent_name(shortname);

View File

@ -1200,7 +1200,8 @@ function update_9_12_2018() {
do_query("alter table consent
add foreign key(consent_type_id)
references consent_type(id)
on update cascade;
on update cascade
on delete restrict;
");
do_query("insert into consent_type