feat: add subscription models
This commit is contained in:
parent
3c4af12fa1
commit
caad08c99e
6 changed files with 61 additions and 1 deletions
1
migrations/2025-02-24-133517_subscriptions/down.sql
Normal file
1
migrations/2025-02-24-133517_subscriptions/down.sql
Normal file
|
|
@ -0,0 +1 @@
|
|||
drop table subscriptions;
|
||||
9
migrations/2025-02-24-133517_subscriptions/up.sql
Normal file
9
migrations/2025-02-24-133517_subscriptions/up.sql
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
create table subscriptions (
|
||||
id integer primary key not null,
|
||||
device_id bigint not null
|
||||
references devices (id)
|
||||
on delete cascade,
|
||||
url text not null,
|
||||
|
||||
unique (device_id, url)
|
||||
);
|
||||
Loading…
Add table
Add a link
Reference in a new issue