adjust for postgres

This commit is contained in:
2021-05-11 16:48:02 +02:00
parent 7346da8419
commit e0bc8371ac
6 changed files with 70 additions and 64 deletions

View File

@ -17,6 +17,7 @@ create table claim_t (
id integer primary key not null default nextval('claim_s'),
key varchar(64) not null,
value varchar(64) not null,
application integer not null references application(id),
unique (key, value)
);
@ -34,13 +35,16 @@ create table user_application_mapping_t (
create or replace view claims_for_user_v as
select u.id as "user",
a.name as application,
c.key as key,
c.value as value
from user_t u,
claim_t c,
user_claim_mapping_t m
user_claim_mapping_t m,
application_t a
where m.user = u.id and
m.claim = c.id;
m.claim = c.id and
a.id = c.application;
create or replace view user_application_v as
select u.login as login,