29 lines
1.5 KiB
SQL
29 lines
1.5 KiB
SQL
-- apply changes
|
|
create table auth_token_cache (
|
|
sys_pk bigint generated by default as identity not null,
|
|
deleted_on timestamp,
|
|
current_approval_level integer default 0 not null,
|
|
required_approval_levels integer default 0 not null,
|
|
auth_token text not null,
|
|
issued_at timestamp not null,
|
|
expires_at timestamp not null,
|
|
refresh_expires_at timestamp not null,
|
|
refresh_token text not null,
|
|
expired boolean default false not null,
|
|
logged_out boolean default false not null,
|
|
deleted boolean default false not null,
|
|
version integer default 1 not null,
|
|
created_at timestamp default 'now()' not null,
|
|
modified_at timestamp default 'now()' not null,
|
|
deleted_by varchar(255),
|
|
approval_status varchar(8) default 'APPROVED' not null,
|
|
tags varchar[] default '{}' not null,
|
|
comments jsonb default '[]' not null,
|
|
user_id varchar(255) not null,
|
|
created_by varchar(255) not null,
|
|
modified_by varchar(255) not null,
|
|
constraint ck_auth_token_cache_approval_status check ( approval_status in ('PENDING','APPROVED','REJECTED')),
|
|
constraint pk_auth_token_cache primary key (sys_pk)
|
|
);
|
|
|