Skip to content

Commit

Permalink
add IF NOT EXISTS
Browse files Browse the repository at this point in the history
  • Loading branch information
ZhangJian He committed May 5, 2023
1 parent 6803be7 commit 56797af
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions apollo-portal/src/main/resources/jpa/init.h2.sql
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@
-- See the License for the specific language governing permissions and
-- limitations under the License.
--
CREATE TABLE SPRING_SESSION
CREATE TABLE SPRING_SESSION IF NOT EXISTS
(
PRIMARY_ID VARCHAR(255) NOT NULL,
SESSION_ID VARCHAR(255) NOT NULL,
Expand All @@ -25,11 +25,11 @@ CREATE TABLE SPRING_SESSION
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 UNIQUE INDEX IF NOT EXISTS SPRING_SESSION_IX1 ON SPRING_SESSION (SESSION_ID);
CREATE INDEX IF NOT EXISTS SPRING_SESSION_IX2 ON SPRING_SESSION (EXPIRY_TIME);
CREATE INDEX IF NOT EXISTS SPRING_SESSION_IX3 ON SPRING_SESSION (PRINCIPAL_NAME);

CREATE TABLE SPRING_SESSION_ATTRIBUTES
CREATE TABLE SPRING_SESSION_ATTRIBUTES IF NOT EXISTS
(
SESSION_PRIMARY_ID VARCHAR(255) NOT NULL,
ATTRIBUTE_NAME VARCHAR(200) NOT NULL,
Expand Down

0 comments on commit 56797af

Please sign in to comment.