Skip to content

Commit 0691c98

Browse files
author
Justin Richer
committed
added database upgrade files, addresses mitreid-connect#455
1 parent c896bef commit 0691c98

File tree

2 files changed

+66
-0
lines changed

2 files changed

+66
-0
lines changed
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
--
2+
-- This SQL script will upgrade your MITREid Connect 1.0 database to a MITREid Connect 1.1 database in-place.
3+
--
4+
-- NOTICE: Any authorization codes that have not been activated will be removed.
5+
--
6+
7+
ALTER TABLE access_token ADD COLUMN approved_site_id BIGINT;
8+
9+
TRUNCATE TABLE authorization_code;
10+
11+
ALTER TABLE authorization_code DROP COLUMN authorization_request_holder;
12+
13+
ALTER TABLE authorization_code ADD COLUMN authentication LONGVARBINARY;
14+
15+
ALTER TABLE client_details ALTER COLUMN id_token_validity_seconds SET NOT NULL;
16+
17+
ALTER TABLE client_details ALTER COLUMN id_token_validity_seconds SET DEFAULT 600;
18+
19+
ALTER TABLE system_scope ADD COLUMN structured BOOLEAN NOT NULL DEFAULT false;
20+
21+
ALTER TABLE system_scope ADD COLUMN structured_param_description VARCHAR(256);
22+
23+
ALTER TABLE user_info ADD COLUMN phone_number_verified BOOLEAN;
24+
25+
DROP TABLE client_nonce;
26+
27+
DROP TABLE event;
28+
29+
CREATE TABLE IF NOT EXISTS pairwise_identifier (
30+
id BIGINT GENERATED BY DEFAULT AS IDENTITY(START WITH 1) PRIMARY KEY,
31+
identifier VARCHAR(256),
32+
sub VARCHAR(256),
33+
sector_identifier VARCHAR(2048)
34+
);
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
--
2+
-- This SQL script will upgrade your MITREid Connect 1.0 database to a MITREid Connect 1.1 database in-place.
3+
--
4+
-- NOTICE: Any authorization codes that have not been activated will be removed.
5+
--
6+
7+
ALTER TABLE access_token ADD COLUMN approved_site_id BIGINT;
8+
9+
TRUNCATE TABLE authorization_code;
10+
11+
ALTER TABLE authorization_code DROP COLUMN authorization_request_holder;
12+
13+
ALTER TABLE authorization_code ADD COLUMN authentication LONGBLOB;
14+
15+
ALTER TABLE client_details MODIFY id_token_validity_seconds BIGINT NOT NULL DEFAULT 600;
16+
17+
ALTER TABLE system_scope ADD COLUMN structured BOOLEAN NOT NULL DEFAULT 0;
18+
19+
ALTER TABLE system_scope ADD COLUMN structured_param_description VARCHAR(256);
20+
21+
ALTER TABLE user_info ADD COLUMN phone_number_verified BOOLEAN;
22+
23+
DROP TABLE client_nonce;
24+
25+
DROP TABLE event;
26+
27+
CREATE TABLE IF NOT EXISTS pairwise_identifier (
28+
id BIGINT AUTO_INCREMENT PRIMARY KEY,
29+
identifier VARCHAR(256),
30+
sub VARCHAR(256),
31+
sector_identifier VARCHAR(2048)
32+
);

0 commit comments

Comments
 (0)