Skip to content

Commit 1455c38

Browse files
author
Eugen
committed
Merge pull request eugenp#278 from Doha2012/master
modify schema
2 parents 60ea63f + a2358d1 commit 1455c38

File tree

1 file changed

+14
-9
lines changed
  • spring-security-oauth/spring-security-oauth-server/src/main/resources

1 file changed

+14
-9
lines changed

spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql

Lines changed: 14 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
-- used in tests that use HSQL
2-
create table if not exists oauth_client_details (
1+
drop table if exists oauth_client_details;
2+
create table oauth_client_details (
33
client_id VARCHAR(255) PRIMARY KEY,
44
resource_ids VARCHAR(255),
55
client_secret VARCHAR(255),
@@ -13,15 +13,17 @@ create table if not exists oauth_client_details (
1313
autoapprove VARCHAR(255)
1414
);
1515

16-
create table if not exists oauth_client_token (
16+
drop table if exists oauth_client_token;
17+
create table oauth_client_token (
1718
token_id VARCHAR(255),
1819
token LONG VARBINARY,
1920
authentication_id VARCHAR(255) PRIMARY KEY,
2021
user_name VARCHAR(255),
2122
client_id VARCHAR(255)
2223
);
2324

24-
create table if not exists oauth_access_token (
25+
drop table if exists oauth_access_token;
26+
create table oauth_access_token (
2527
token_id VARCHAR(255),
2628
token LONG VARBINARY,
2729
authentication_id VARCHAR(255) PRIMARY KEY,
@@ -31,17 +33,20 @@ create table if not exists oauth_access_token (
3133
refresh_token VARCHAR(255)
3234
);
3335

34-
create table if not exists oauth_refresh_token (
36+
drop table if exists oauth_refresh_token;
37+
create table oauth_refresh_token (
3538
token_id VARCHAR(255),
3639
token LONG VARBINARY,
3740
authentication LONG VARBINARY
3841
);
3942

40-
create table if not exists oauth_code (
43+
drop table if exists oauth_code;
44+
create table oauth_code (
4145
code VARCHAR(255), authentication LONG VARBINARY
4246
);
4347

44-
create table if not exists oauth_approvals (
48+
drop table if exists oauth_approvals;
49+
create table oauth_approvals (
4550
userId VARCHAR(255),
4651
clientId VARCHAR(255),
4752
scope VARCHAR(255),
@@ -50,8 +55,8 @@ create table if not exists oauth_approvals (
5055
lastModifiedAt TIMESTAMP
5156
);
5257

53-
-- customized oauth_client_details table
54-
create table if not exists ClientDetails (
58+
drop table if exists ClientDetails;
59+
create table ClientDetails (
5560
appId VARCHAR(255) PRIMARY KEY,
5661
resourceIds VARCHAR(255),
5762
appSecret VARCHAR(255),

0 commit comments

Comments
 (0)