-
Notifications
You must be signed in to change notification settings - Fork 23
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat(pollux): Add migrations needed for JWT revocation #778
Merged
Merged
Changes from all commits
Commits
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ megalinter-reports/ | |
.vscode | ||
.bloop | ||
.bsp | ||
.jvmopts | ||
.metals | ||
**/project/metals.sbt | ||
target | ||
|
35 changes: 35 additions & 0 deletions
35
...l-doobie/src/main/resources/sql/pollux/V16__revocation_status_lists_table_and_columns.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,35 @@ | ||||||
CREATE TYPE public.enum_credential_status_list_purpose AS ENUM ( | ||||||
'Revocation', | ||||||
'Suspension'); | ||||||
|
||||||
|
||||||
CREATE TABLE public.credential_status_lists | ||||||
( | ||||||
id UUID PRIMARY KEY default gen_random_uuid(), | ||||||
wallet_id UUID NOT NULL, | ||||||
issuer VARCHAR NOT NULL, | ||||||
issued TIMESTAMP WITH TIME ZONE NOT NULL, | ||||||
purpose public.enum_credential_status_list_purpose NOT NULL, | ||||||
encoded_list TEXT NOT NULL, | ||||||
proof JSON NOT NULL, | ||||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL default now(), | ||||||
updated_at TIMESTAMP WITH TIME ZONE NOT NULL default now() | ||||||
); | ||||||
|
||||||
CREATE INDEX credential_status_lists_wallet_id_index ON public.credential_revocation_status_lists (wallet_id); | ||||||
|
||||||
CREATE TABLE public.credentials_in_status_list | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I would call it |
||||||
( | ||||||
id UUID PRIMARY KEY default gen_random_uuid(), | ||||||
issue_credential_record_id UUID NOT NULL, | ||||||
yshyn-iohk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
credential_status_list_id UUID NOT NULL, | ||||||
status_list_index INTEGER NOT NULL, | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
-- is revoked or suspended | ||||||
is_canceled BOOLEAN NOT NULL default false, | ||||||
yshyn-iohk marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
created_at TIMESTAMP WITH TIME ZONE NOT NULL default now(), | ||||||
updated_at TIMESTAMP WITH TIME ZONE NOT NULL default now(), | ||||||
|
||||||
CONSTRAINT issue_credential_record_id_fkey FOREIGN KEY (issue_credential_record_id) REFERENCES public.issue_credential_records (id) ON DELETE CASCADE ON UPDATE CASCADE, | ||||||
CONSTRAINT credential_status_list_id_fkey FOREIGN KEY (credential_status_list_id) REFERENCES public.credential_status_lists (id) ON DELETE CASCADE ON UPDATE CASCADE | ||||||
); | ||||||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would make it lower case for simplicity