-
Notifications
You must be signed in to change notification settings - Fork 44
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
9294a9a
commit 710f243
Showing
2 changed files
with
44 additions
and
0 deletions.
There are no files selected for viewing
22 changes: 22 additions & 0 deletions
22
iam-persistence/src/main/resources/db/migration/h2/V106__jdbc_session.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,22 @@ | ||
CREATE TABLE IF NOT EXISTS 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 IF NOT EXISTS SPRING_SESSION_ATTRIBUTES ( | ||
SESSION_PRIMARY_ID CHAR(36) NOT NULL, | ||
ATTRIBUTE_NAME VARCHAR(200) NOT NULL, | ||
ATTRIBUTE_BYTES LONGVARBINARY 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 | ||
); |
22 changes: 22 additions & 0 deletions
22
iam-persistence/src/main/resources/db/migration/mysql/V106__jdbc_session.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,22 @@ | ||
CREATE TABLE IF NOT EXISTS 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) | ||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; | ||
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 IF NOT EXISTS SPRING_SESSION_ATTRIBUTES | ||
( | ||
SESSION_PRIMARY_ID CHAR(36) NOT NULL, | ||
ATTRIBUTE_NAME VARCHAR(200) NOT NULL, | ||
ATTRIBUTE_BYTES BLOB 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 | ||
) ENGINE=InnoDB ROW_FORMAT=DYNAMIC; |