This commit is contained in:
2025-08-04 20:43:47 +03:00
parent d5ed160746
commit 18b13fdb57
5 changed files with 188 additions and 3 deletions

View File

@ -73,8 +73,9 @@ create table picrinth.accounts (
platform text not null,
login text not null,
password text not null,
metadata jsonb null, -- meybe not needed
metadata jsonb null,
created_at timestamp with time zone default now(),
primary key (id),
constraint unique_account_per_platform unique (platform, login)
);
@ -82,7 +83,7 @@ create table picrinth.group_accounts (
groupname text not null,
account_id int not null,
created_at timestamp with time zone default now(),
constraint unique_group_accounts unique (account_id, groupname)
foreign key (groupname) references picrinth.groups (groupname) on delete cascade on update cascade
constraint unique_group_accounts unique (account_id, groupname),
foreign key (groupname) references picrinth.groups (groupname) on delete cascade on update cascade,
foreign key (account_id) references picrinth.accounts (id) on delete cascade on update cascade
);