-
Notifications
You must be signed in to change notification settings - Fork 6
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
NET-382: enable persistent SolarUser HTTP sessions using JDBC.
- Loading branch information
Showing
3 changed files
with
33 additions
and
0 deletions.
There are no files selected for viewing
29 changes: 29 additions & 0 deletions
29
solarnet-db-setup/postgres/updates/NET-382-http-sessions.sql
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
/** | ||
* HTTP session state information. | ||
*/ | ||
CREATE TABLE solaruser.http_session ( | ||
PRIMARY_ID CHAR(36) NOT NULL, | ||
SESSION_ID CHAR(36) NOT NULL, | ||
CREATION_TIME BIGINT NOT NULL, | ||
LAST_ACCESS_TIME BIGINT NOT NULL, | ||
MAX_INACTIVE_INTERVAL INT NOT NULL, | ||
EXPIRY_TIME BIGINT NOT NULL, | ||
PRINCIPAL_NAME VARCHAR(100), | ||
CONSTRAINT http_session_pk PRIMARY KEY (PRIMARY_ID), | ||
CONSTRAINT http_session_session_unq UNIQUE (SESSION_ID) | ||
); | ||
|
||
CREATE INDEX http_session_exp_idx ON solaruser.http_session (EXPIRY_TIME); | ||
CREATE INDEX http_session_principal_idx ON solaruser.http_session (PRINCIPAL_NAME); | ||
|
||
/** | ||
* HTTP session state attribute information. | ||
*/ | ||
CREATE TABLE solaruser.http_session_attributes ( | ||
SESSION_PRIMARY_ID CHAR(36) NOT NULL, | ||
ATTRIBUTE_NAME VARCHAR(200) NOT NULL, | ||
ATTRIBUTE_BYTES BYTEA NOT NULL, | ||
CONSTRAINT http_session_attributes_pk PRIMARY KEY (SESSION_PRIMARY_ID, ATTRIBUTE_NAME), | ||
CONSTRAINT http_session_attributes_http_session_fk FOREIGN KEY (SESSION_PRIMARY_ID) | ||
REFERENCES solaruser.http_session(PRIMARY_ID) ON DELETE CASCADE | ||
); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters