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

@ -74,4 +74,4 @@ CREATE GLOBAL TEMPORARY TABLE system_scope_TEMP (
default_scope NUMBER(1), default_scope NUMBER(1),
structured NUMBER(1), structured NUMBER(1),
structured_param_description VARCHAR2(256) structured_param_description VARCHAR2(256)
) ON COMMIT PRESERVE ROWS; ) ON COMMIT PRESERVE ROWS;

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;
@ -178,9 +182,14 @@ CREATE TABLE client_details (
software_statement VARCHAR2(4000), software_statement VARCHAR2(4000),
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;
@ -384,4 +399,4 @@ CREATE SEQUENCE saved_registered_client_seq START WITH 1 INCREMENT BY 1 NOCACHE
CREATE INDEX at_tv_idx ON access_token(token_value); CREATE INDEX at_tv_idx ON access_token(token_value);
CREATE INDEX ts_oi_idx ON token_scope(owner_id); CREATE INDEX ts_oi_idx ON token_scope(owner_id);
CREATE INDEX at_exp_idx ON access_token(expiration); CREATE INDEX at_exp_idx ON access_token(expiration);
CREATE INDEX rf_ahi_idx ON refresh_token(auth_holder_id); CREATE INDEX rf_ahi_idx ON refresh_token(auth_holder_id);

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 (
@ -13,4 +15,4 @@ create table authorities (
authority varchar2(50) not null, authority varchar2(50) not null,
constraint fk_authorities_users foreign key(username) references users(username), constraint fk_authorities_users foreign key(username) references users(username),
constraint ix_authority unique (username,authority) constraint ix_authority unique (username,authority)
); );

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>