ojdbc6 dependency moved to parent pom, added check constraints for boolean columns, fixed invalid column type

pull/1079/merge
Tomasz Borowiec 2016-11-04 12:34:52 +01:00 committed by Justin Richer
parent 83a9fef14d
commit 4b3284ffd2
5 changed files with 33 additions and 17 deletions

View File

@ -133,13 +133,6 @@
<groupId>com.zaxxer</groupId> <groupId>com.zaxxer</groupId>
<artifactId>HikariCP</artifactId> <artifactId>HikariCP</artifactId>
</dependency> </dependency>
<!-- uncomment for Oracle (manually install driver in Maven prior) -->
<!--<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.1.0.7.0</version>
</dependency>-->
</dependencies> </dependencies>
<description>Deployable package of the OpenID Connect server</description> <description>Deployable package of the OpenID Connect server</description>
</project> </project>

View File

@ -52,7 +52,9 @@ CREATE TABLE authentication_holder (
user_auth_id NUMBER(19), user_auth_id NUMBER(19),
approved NUMBER(1), approved NUMBER(1),
redirect_uri VARCHAR2(2048), redirect_uri VARCHAR2(2048),
client_id VARCHAR2(256) client_id VARCHAR2(256),
CONSTRAINT approved_check CHECK (approved in (1,0))
); );
CREATE SEQUENCE authentication_holder_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE; CREATE SEQUENCE authentication_holder_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
@ -92,7 +94,9 @@ CREATE TABLE saved_user_auth (
id NUMBER(19) NOT NULL PRIMARY KEY, id NUMBER(19) NOT NULL PRIMARY KEY,
name VARCHAR2(1024), name VARCHAR2(1024),
authenticated NUMBER(1), authenticated NUMBER(1),
source_class VARCHAR2(2048) source_class VARCHAR2(2048),
CONSTRAINT authenticated_check CHECK (authenticated in (1,0))
); );
CREATE SEQUENCE saved_user_auth_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE; CREATE SEQUENCE saved_user_auth_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
@ -180,7 +184,12 @@ CREATE TABLE client_details (
code_challenge_method VARCHAR2(256), code_challenge_method VARCHAR2(256),
CONSTRAINT client_details_unique UNIQUE (client_id) CONSTRAINT client_details_unique UNIQUE (client_id),
CONSTRAINT reuse_refresh_tokens_check CHECK (reuse_refresh_tokens in (1,0)),
CONSTRAINT dynamically_registered_check CHECK (dynamically_registered in (1,0)),
CONSTRAINT allow_introspection_check CHECK (allow_introspection in (1,0)),
CONSTRAINT require_auth_time_check CHECK (require_auth_time in (1,0)),
CONSTRAINT clear_acc_tok_on_refresh_check CHECK (clear_access_tokens_on_refresh in (1,0))
); );
CREATE SEQUENCE client_details_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE; CREATE SEQUENCE client_details_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
@ -248,7 +257,10 @@ CREATE TABLE system_scope (
structured NUMBER(1) DEFAULT 0 NOT NULL, structured NUMBER(1) DEFAULT 0 NOT NULL,
structured_param_description VARCHAR2(256), structured_param_description VARCHAR2(256),
CONSTRAINT system_scope_unique UNIQUE (scope) CONSTRAINT system_scope_unique UNIQUE (scope),
CONSTRAINT default_scope_check CHECK (default_scope in (1,0)),
CONSTRAINT restricted_check CHECK (restricted in (1,0)),
CONSTRAINT structured_check CHECK (structured in (1,0))
); );
CREATE SEQUENCE system_scope_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE; CREATE SEQUENCE system_scope_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
@ -274,7 +286,10 @@ CREATE TABLE user_info (
address_id VARCHAR2(256), address_id VARCHAR2(256),
updated_time VARCHAR2(256), updated_time VARCHAR2(256),
birthdate VARCHAR2(256), birthdate VARCHAR2(256),
src VARCHAR2(4000) src VARCHAR2(4000),
CONSTRAINT email_verified_check CHECK (email_verified in (1,0)),
CONSTRAINT phone_number_verified_check CHECK (phone_number_verified in (1,0))
); );
CREATE SEQUENCE user_info_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE; CREATE SEQUENCE user_info_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;

View File

@ -5,7 +5,9 @@
create table users( create table users(
username varchar2(50) not null primary key, username varchar2(50) not null primary key,
password varchar2(50) not null, password varchar2(50) not null,
enabled number(19) not null enabled number(1) not null,
constraint enabled_check check (enabled in (1, 0))
); );
create table authorities ( create table authorities (

View File

@ -380,6 +380,12 @@
<artifactId>postgresql</artifactId> <artifactId>postgresql</artifactId>
<version>9.4-1201-jdbc4</version> <version>9.4-1201-jdbc4</version>
</dependency> </dependency>
<!-- uncomment for Oracle (manually install driver in Maven prior) -->
<!--<dependency>
<groupId>com.oracle</groupId>
<artifactId>ojdbc6</artifactId>
<version>11.1.0.7.0</version>
</dependency>-->
<dependency> <dependency>
<groupId>org.eclipse.persistence</groupId> <groupId>org.eclipse.persistence</groupId>
<artifactId>org.eclipse.persistence.jpa</artifactId> <artifactId>org.eclipse.persistence.jpa</artifactId>