From a2358d12ff6f622da2a40d99a68632508ca863f4 Mon Sep 17 00:00:00 2001 From: DOHA Date: Sat, 14 Nov 2015 21:52:48 +0200 Subject: [PATCH] modify schema --- .../src/main/resources/schema.sql | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql b/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql index c7cc53845e..9c0b504a42 100644 --- a/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql +++ b/spring-security-oauth/spring-security-oauth-server/src/main/resources/schema.sql @@ -1,5 +1,5 @@ --- used in tests that use HSQL -create table if not exists oauth_client_details ( +drop table if exists oauth_client_details; +create table oauth_client_details ( client_id VARCHAR(255) PRIMARY KEY, resource_ids VARCHAR(255), client_secret VARCHAR(255), @@ -13,7 +13,8 @@ create table if not exists oauth_client_details ( autoapprove VARCHAR(255) ); -create table if not exists oauth_client_token ( +drop table if exists oauth_client_token; +create table oauth_client_token ( token_id VARCHAR(255), token LONG VARBINARY, authentication_id VARCHAR(255) PRIMARY KEY, @@ -21,7 +22,8 @@ create table if not exists oauth_client_token ( client_id VARCHAR(255) ); -create table if not exists oauth_access_token ( +drop table if exists oauth_access_token; +create table oauth_access_token ( token_id VARCHAR(255), token LONG VARBINARY, authentication_id VARCHAR(255) PRIMARY KEY, @@ -31,17 +33,20 @@ create table if not exists oauth_access_token ( refresh_token VARCHAR(255) ); -create table if not exists oauth_refresh_token ( +drop table if exists oauth_refresh_token; +create table oauth_refresh_token ( token_id VARCHAR(255), token LONG VARBINARY, authentication LONG VARBINARY ); -create table if not exists oauth_code ( +drop table if exists oauth_code; +create table oauth_code ( code VARCHAR(255), authentication LONG VARBINARY ); -create table if not exists oauth_approvals ( +drop table if exists oauth_approvals; +create table oauth_approvals ( userId VARCHAR(255), clientId VARCHAR(255), scope VARCHAR(255), @@ -50,8 +55,8 @@ create table if not exists oauth_approvals ( lastModifiedAt TIMESTAMP ); --- customized oauth_client_details table -create table if not exists ClientDetails ( +drop table if exists ClientDetails; +create table ClientDetails ( appId VARCHAR(255) PRIMARY KEY, resourceIds VARCHAR(255), appSecret VARCHAR(255),