Fix some sql errors due to make skripts executable for Oracle
parent
a2e8cb1a67
commit
a5836ca894
|
@ -6,13 +6,12 @@ CREATE INDEX at_tv_idx ON access_token(token_value);
|
|||
CREATE INDEX ts_oi_idx ON token_scope(owner_id);
|
||||
CREATE INDEX at_exp_idx ON access_token(expiration);
|
||||
CREATE INDEX rf_ahi_idx ON refresh_token(auth_holder_id);
|
||||
CREATE INDEX rf_tv_idx ON refresh_token(token_value);
|
||||
CREATE INDEX at_ahi_idx ON access_token(auth_holder_id);
|
||||
CREATE INDEX aha_oi_idx ON authentication_holder_authority(owner_id);
|
||||
CREATE INDEX ahe_oi_idx ON authentication_holder_extension(owner_id);
|
||||
CREATE INDEX ahrp_oi_idx ON authentication_holder_request_parameter(owner_id);
|
||||
CREATE INDEX ahri_oi_idx ON authentication_holder_resource_id(owner_id);
|
||||
CREATE INDEX ahrt_oi_idx ON authentication_holder_response_type(owner_id);
|
||||
CREATE INDEX aha_oi_idx ON auth_holder_authority(owner_id);
|
||||
CREATE INDEX ahe_oi_idx ON auth_holder_extension(owner_id);
|
||||
CREATE INDEX ahrp_oi_idx ON auth_holder_request_parameter(owner_id);
|
||||
CREATE INDEX ahri_oi_idx ON auth_holder_resource_id(owner_id);
|
||||
CREATE INDEX ahrt_oi_idx ON auth_holder_response_type(owner_id);
|
||||
CREATE INDEX ahs_oi_idx ON authentication_holder_scope(owner_id);
|
||||
CREATE INDEX ac_ahi_idx ON authorization_code(auth_holder_id);
|
||||
CREATE INDEX suaa_oi_idx ON saved_user_auth_authority(owner_id);
|
||||
|
|
|
@ -101,7 +101,7 @@ CREATE SEQUENCE saved_user_auth_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
|
|||
|
||||
CREATE TABLE saved_user_auth_authority (
|
||||
owner_id NUMBER(19),
|
||||
authority VARCHAR2(256)
|
||||
authority VARCHAR2(1024)
|
||||
);
|
||||
|
||||
CREATE TABLE client_authority (
|
||||
|
@ -180,9 +180,9 @@ CREATE TABLE client_details (
|
|||
initiate_login_uri VARCHAR2(2048),
|
||||
clear_access_tokens_on_refresh NUMBER(1) DEFAULT 1 NOT NULL,
|
||||
|
||||
software_statement VARCHAR(4096),
|
||||
software_id VARCHAR(2048),
|
||||
software_statement VARCHAR2(4000),
|
||||
software_version VARCHAR2(2048),
|
||||
|
||||
code_challenge_method VARCHAR2(256),
|
||||
|
||||
|
@ -255,11 +255,14 @@ CREATE TABLE system_scope (
|
|||
description VARCHAR2(4000),
|
||||
icon VARCHAR2(256),
|
||||
restricted NUMBER(1) DEFAULT 0 NOT NULL,
|
||||
default_scope NUMBER(1) DEFAULT 0 NOT NULL
|
||||
default_scope NUMBER(1) DEFAULT 0 NOT NULL,
|
||||
structured NUMBER(1) DEFAULT 0 NOT NULL,
|
||||
structured_param_description VARCHAR2(256),
|
||||
|
||||
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 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;
|
||||
|
||||
|
@ -395,22 +398,22 @@ CREATE TABLE saved_registered_client (
|
|||
);
|
||||
CREATE SEQUENCE saved_registered_client_seq START WITH 1 INCREMENT BY 1 NOCACHE NOCYCLE;
|
||||
|
||||
CREATE TABLE IF NOT EXISTS device_code (
|
||||
CREATE TABLE device_code (
|
||||
id NUMBER(19) NOT NULL PRIMARY KEY,
|
||||
device_code VARCHAR2(1024),
|
||||
user_code VARCHAR2(1024),
|
||||
expiration TIMESTAMP,
|
||||
client_id VARCHAR2(256),
|
||||
approved BOOLEAN,
|
||||
approved NUMBER(1,0),
|
||||
auth_holder_id NUMBER(19)
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS device_code_scope (
|
||||
CREATE TABLE device_code_scope (
|
||||
owner_id NUMBER(19) NOT NULL,
|
||||
scope VARCHAR2(256) NOT NULL
|
||||
);
|
||||
|
||||
CREATE TABLE IF NOT EXISTS device_code_request_parameter (
|
||||
CREATE TABLE device_code_request_parameter (
|
||||
owner_id NUMBER(19),
|
||||
param VARCHAR2(2048),
|
||||
val VARCHAR2(2048)
|
||||
|
|
|
@ -2,25 +2,26 @@
|
|||
-- Insert scope information into the temporary tables.
|
||||
--
|
||||
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES
|
||||
('openid', 'log in using your identity', 'user', 0, 1);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES
|
||||
('profile', 'basic profile information', 'list-alt', 0, 1);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES
|
||||
('email', 'email address', 'envelope', 0, 1);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES
|
||||
('address', 'physical address', 'home', 0, 1);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES
|
||||
('phone', 'telephone number', 'bell', 0, 1, 0);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope) VALUES
|
||||
('offline_access', 'offline access', 'time', 0, 0);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES
|
||||
('openid', 'log in using your identity', 'user', 0, 1, 0, null);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES
|
||||
('profile', 'basic profile information', 'list-alt', 0, 1, 0, null);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES
|
||||
('email', 'email address', 'envelope', 0, 1, 0, null);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES
|
||||
('address', 'physical address', 'home', 0, 1, 0, null);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES
|
||||
('phone', 'telephone number', 'bell', 0, 1, 0, null);
|
||||
INSERT INTO system_scope_TEMP (scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES
|
||||
('offline_access', 'offline access', 'time', 0, 0, 0, null);
|
||||
|
||||
--
|
||||
-- Merge the temporary scopes safely into the database. This is a two-step process to keep scopes from being created on every startup with a persistent store.
|
||||
--
|
||||
|
||||
MERGE INTO system_scope
|
||||
USING (SELECT scope, description, icon, restricted, default_scope FROM system_scope_TEMP) vals
|
||||
USING (SELECT scope, description, icon, restricted, default_scope, structured, structured_param_description FROM system_scope_TEMP) vals
|
||||
ON (vals.scope = system_scope.scope)
|
||||
WHEN NOT MATCHED THEN
|
||||
INSERT (id, scope, description, icon, restricted, default_scope) VALUES(system_scope_seq.nextval, vals.scope,
|
||||
vals.description, vals.icon, vals.restricted, vals.default_scope);
|
||||
INSERT (id, scope, description, icon, restricted, default_scope, structured, structured_param_description) VALUES(system_scope_seq.nextval, vals.scope,
|
||||
vals.description, vals.icon, vals.restricted, vals.default_scope, vals.structured, vals.structured_param_description);
|
Loading…
Reference in New Issue