-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
ed45fee
commit 3f15244
Showing
2 changed files
with
26 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,25 @@ | ||
CREATE TABLE spring_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 spring_session_pk PRIMARY KEY (primary_id) | ||
); | ||
|
||
CREATE UNIQUE INDEX spring_session_ix1 ON spring_session (session_id); | ||
CREATE INDEX spring_session_ix2 ON spring_session (expiry_time); | ||
CREATE INDEX spring_session_ix3 ON spring_session (principal_name); | ||
|
||
CREATE TABLE spring_session_attributes | ||
( | ||
session_primary_id CHAR(36) NOT NULL, | ||
attribute_name VARCHAR(200) NOT NULL, | ||
attribute_bytes BYTEA NOT NULL, | ||
CONSTRAINT spring_session_attributes_pk PRIMARY KEY (session_primary_id, attribute_name), | ||
CONSTRAINT spring_session_attributes_fk FOREIGN KEY (session_primary_id) | ||
REFERENCES spring_session (primary_id) ON DELETE CASCADE | ||
); |