diff --git a/openid-connect-server-webapp/src/main/resources/db/upgrade/hsql_1.0-to-1.1_upgrade.sql b/openid-connect-server-webapp/src/main/resources/db/upgrade/hsql_1.0-to-1.1_upgrade.sql new file mode 100644 index 000000000..408f5fafc --- /dev/null +++ b/openid-connect-server-webapp/src/main/resources/db/upgrade/hsql_1.0-to-1.1_upgrade.sql @@ -0,0 +1,34 @@ +-- +-- This SQL script will upgrade your MITREid Connect 1.0 database to a MITREid Connect 1.1 database in-place. +-- +-- NOTICE: Any authorization codes that have not been activated will be removed. +-- + +ALTER TABLE access_token ADD COLUMN approved_site_id BIGINT; + +TRUNCATE TABLE authorization_code; + +ALTER TABLE authorization_code DROP COLUMN authorization_request_holder; + +ALTER TABLE authorization_code ADD COLUMN authentication LONGVARBINARY; + +ALTER TABLE client_details ALTER COLUMN id_token_validity_seconds SET NOT NULL; + +ALTER TABLE client_details ALTER COLUMN id_token_validity_seconds SET DEFAULT 600; + +ALTER TABLE system_scope ADD COLUMN structured BOOLEAN NOT NULL DEFAULT false; + +ALTER TABLE system_scope ADD COLUMN structured_param_description VARCHAR(256); + +ALTER TABLE user_info ADD COLUMN phone_number_verified BOOLEAN; + +DROP TABLE client_nonce; + +DROP TABLE event; + +CREATE TABLE IF NOT EXISTS pairwise_identifier ( + id BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) PRIMARY KEY, + identifier VARCHAR(256), + sub VARCHAR(256), + sector_identifier VARCHAR(2048) +); diff --git a/openid-connect-server-webapp/src/main/resources/db/upgrade/mysql_1.0-to-1.1_upgrade.sql b/openid-connect-server-webapp/src/main/resources/db/upgrade/mysql_1.0-to-1.1_upgrade.sql new file mode 100644 index 000000000..5fe57be22 --- /dev/null +++ b/openid-connect-server-webapp/src/main/resources/db/upgrade/mysql_1.0-to-1.1_upgrade.sql @@ -0,0 +1,32 @@ +-- +-- This SQL script will upgrade your MITREid Connect 1.0 database to a MITREid Connect 1.1 database in-place. +-- +-- NOTICE: Any authorization codes that have not been activated will be removed. +-- + +ALTER TABLE access_token ADD COLUMN approved_site_id BIGINT; + +TRUNCATE TABLE authorization_code; + +ALTER TABLE authorization_code DROP COLUMN authorization_request_holder; + +ALTER TABLE authorization_code ADD COLUMN authentication LONGBLOB; + +ALTER TABLE client_details MODIFY id_token_validity_seconds BIGINT NOT NULL DEFAULT 600; + +ALTER TABLE system_scope ADD COLUMN structured BOOLEAN NOT NULL DEFAULT 0; + +ALTER TABLE system_scope ADD COLUMN structured_param_description VARCHAR(256); + +ALTER TABLE user_info ADD COLUMN phone_number_verified BOOLEAN; + +DROP TABLE client_nonce; + +DROP TABLE event; + +CREATE TABLE IF NOT EXISTS pairwise_identifier ( + id BIGINT AUTO_INCREMENT PRIMARY KEY, + identifier VARCHAR(256), + sub VARCHAR(256), + sector_identifier VARCHAR(2048) +);