Skip to content

Commit c6d099c

Browse files
authored
fix: changelog (#230)
1 parent e2b7082 commit c6d099c

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

CHANGELOG.md

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,57 @@ to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
1212
- Compatible with plugin interface version 6.3
1313
- Adds support for OAuthStorage
1414

15+
### Migration
16+
17+
```sql
18+
CREATE TABLE IF NOT EXISTS oauth_clients (
19+
app_id VARCHAR(64),
20+
client_id VARCHAR(128) NOT NULL,
21+
is_client_credentials_only BOOLEAN NOT NULL,
22+
PRIMARY KEY (app_id, client_id),
23+
FOREIGN KEY(app_id) REFERENCES apps(app_id) ON DELETE CASCADE
24+
);
25+
26+
CREATE TABLE IF NOT EXISTS oauth_revoke (
27+
app_id VARCHAR(64) DEFAULT 'public',
28+
target_type VARCHAR(16) NOT NULL,
29+
target_value VARCHAR(128) NOT NULL,
30+
timestamp BIGINT NOT NULL,
31+
exp BIGINT NOT NULL,
32+
PRIMARY KEY (app_id, target_type, target_value),
33+
FOREIGN KEY(app_id) REFERENCES apps(app_id) ON DELETE CASCADE
34+
);
35+
36+
CREATE INDEX IF NOT EXISTS oauth_revoke_timestamp_index ON oauth_revoke(timestamp DESC, app_id DESC);
37+
CREATE INDEX IF NOT EXISTS oauth_revoke_exp_index ON oauth_revoke(exp DESC);
38+
39+
CREATE TABLE IF NOT EXISTS oauth_m2m_tokens (
40+
app_id VARCHAR(64) DEFAULT 'public',
41+
client_id VARCHAR(128) NOT NULL,
42+
iat BIGINT NOT NULL,
43+
exp BIGINT NOT NULL,
44+
PRIMARY KEY (app_id, client_id, iat),
45+
FOREIGN KEY(app_id, client_id) REFERENCES oauth_clients(app_id, client_id) ON DELETE CASCADE
46+
);
47+
48+
CREATE INDEX IF NOT EXISTS oauth_m2m_token_iat_index ON oauth_m2m_tokens(iat DESC, app_id DESC);
49+
CREATE INDEX IF NOT EXISTS oauth_m2m_token_exp_index ON oauth_m2m_tokens(exp DESC);
50+
51+
CREATE TABLE IF NOT EXISTS oauth_logout_challenges (
52+
app_id VARCHAR(64) DEFAULT 'public',
53+
challenge VARCHAR(128) NOT NULL,
54+
client_id VARCHAR(128) NOT NULL,
55+
post_logout_redirect_uri VARCHAR(1024),
56+
session_handle VARCHAR(128),
57+
state VARCHAR(128),
58+
time_created BIGINT NOT NULL,
59+
PRIMARY KEY (app_id, challenge),
60+
FOREIGN KEY(app_id, client_id) REFERENCES oauth_clients(app_id, client_id) ON DELETE CASCADE
61+
);
62+
63+
CREATE INDEX IF NOT EXISTS oauth_logout_challenges_time_created_index ON oauth_logout_challenges(time_created DESC);
64+
```
65+
1566
## [7.1.3] - 2024-09-04
1667

1768
- Adds index on `last_active_time` for `user_last_active` table to improve the performance of MAU computation.

0 commit comments

Comments
 (0)