Skip to content

Commit 9bf3f4a

Browse files
committed
chore: fix reverts for keycloak_jwt type & prettier for session revert
1 parent c74f5a3 commit 9bf3f4a

2 files changed

Lines changed: 2 additions & 29 deletions

File tree

schema/revert/functions/session_003_reorder_setting_selection.sql

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,3 @@ $function$ language plpgsql stable;
4444
grant execute on function cif.session to cif_internal, cif_external, cif_admin, cif_guest;
4545

4646
commit;
47-

schema/revert/types/keycloak_jwt.sql

Lines changed: 2 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,7 @@
33

44
begin;
55

6-
drop type cif.keycloak_jwt;
7-
8-
-- Recreating the type with the `sub` field as text
9-
10-
create type cif.keycloak_jwt as (
11-
jti uuid,
12-
exp integer,
13-
nbf integer,
14-
iat integer,
15-
iss text,
16-
aud text,
17-
sub text,
18-
typ text,
19-
azp text,
20-
auth_time integer,
21-
session_state uuid,
22-
acr text,
23-
email_verified boolean,
24-
name text,
25-
preferred_username text,
26-
given_name text,
27-
family_name text,
28-
email text,
29-
broker_session_id text,
30-
priority_group text,
31-
user_groups text[]
32-
);
33-
comment on type cif.keycloak_jwt is E'@primaryKey sub\n@foreignKey (sub) references cif_user (session_sub)';
6+
alter type cif.keycloak_jwt drop attribute session_state;
7+
alter type cif.keycloak_jwt add attribute session_state uuid;
348

359
commit;

0 commit comments

Comments
 (0)