X-Git-Url: https://git.ktnx.net/?a=blobdiff_plain;f=sql%2Fschema%2Finit.sql;h=66daf0c53298a56b91589f162e0891efacdeba7e;hb=446f81036c7082123098d6afe641c5a149deac25;hp=3eed88d8c4b096863182926c1c59b0544e7da88c;hpb=b28adff9a0ae8c3359e2bcf315479b46ad90306b;p=lsl.git diff --git a/sql/schema/init.sql b/sql/schema/init.sql index 3eed88d..66daf0c 100644 --- a/sql/schema/init.sql +++ b/sql/schema/init.sql @@ -11,7 +11,9 @@ create table shopping_lists( create table shopping_list_items( id bigserial primary key, - shopping_list bigint not null references shopping_lists(id), + shopping_list bigint not null + references shopping_lists(id) + on delete cascade, description text not null, version bigint not null default 1, done boolean not null default false );