Skip to content

Commit

Permalink
add an index for (signatures, created_at) on the jwks table (#610)
Browse files Browse the repository at this point in the history
  • Loading branch information
sebadob authored Nov 11, 2024
1 parent 161f303 commit 2113dce
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 0 additions & 2 deletions dev_notes.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,6 @@
### After finished Hiqlite migration

- check changed session invalidation functions
- fix `DbType::from_str`
- add an index (signature, created_at) to `jwks`

## Documentation TODO

Expand Down
3 changes: 3 additions & 0 deletions migrations/hiqlite/1_init_schema.sql
Original file line number Diff line number Diff line change
Expand Up @@ -163,6 +163,9 @@ CREATE TABLE jwks
jwk BLOB NOT NULL
) STRICT;

CREATE INDEX jwks_signature_created_at_index
ON jwks (signature, created_at);

CREATE TABLE roles
(
id TEXT NOT NULL
Expand Down
2 changes: 2 additions & 0 deletions migrations/postgres/26_jwks_sig_ts_index.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
CREATE INDEX jwks_signature_created_at_index
ON jwks (signature, created_at);

0 comments on commit 2113dce

Please sign in to comment.