Add on delete cascade

This commit is contained in:
MartinBraquet
2025-10-23 00:29:14 +02:00
parent 46820f0986
commit b8b95be5ce

View File

@@ -1,6 +1,6 @@
create table push_subscriptions (
id serial primary key,
user_id TEXT references users(id), -- optional if per-user
user_id TEXT references users(id) on delete cascade,
endpoint text not null unique,
keys jsonb not null,
created_at timestamptz default now()