Skip to content

Commit 42a787d

Browse files
candrewsjgrandja
authored andcommitted
Add Postgres sql for JDBC implementation of OAuth2AuthorizedClientService
Postgres doesn't have a BLOB type, but it does have an equivalent BYTEA type. This approach and naming convention follows the convention established in Spring Session JDBC which has sql for each RDBMS with files names in the pattern *-{dbname}.sql, for example: schema-db2.sql schema-derby.sql schema-h2.sql schema-mysql.sql schema-postgresql.sql See https://github.com/spring-projects/spring-session/tree/2.3.1.RELEASE/spring-session-jdbc/src/main/resources/org/springframework/session/jdbc Issue gh-9070
1 parent 05dc326 commit 42a787d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
CREATE TABLE oauth2_authorized_client (
2+
client_registration_id varchar(100) NOT NULL,
3+
principal_name varchar(200) NOT NULL,
4+
access_token_type varchar(100) NOT NULL,
5+
access_token_value bytea NOT NULL,
6+
access_token_issued_at timestamp NOT NULL,
7+
access_token_expires_at timestamp NOT NULL,
8+
access_token_scopes varchar(1000) DEFAULT NULL,
9+
refresh_token_value bytea DEFAULT NULL,
10+
refresh_token_issued_at timestamp DEFAULT NULL,
11+
created_at timestamp DEFAULT CURRENT_TIMESTAMP NOT NULL,
12+
PRIMARY KEY (client_registration_id, principal_name)
13+
);

0 commit comments

Comments
 (0)