Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -87,6 +87,8 @@ dependencies {
// https://mvnrepository.com/artifact/io.springfox/springfox-swagger2
implementation group: 'io.springfox', name: 'springfox-swagger2', version: '2.9.2'

// flyway
implementation 'org.flywaydb:flyway-core:6.4.2'
}

tasks.named('test') {
Expand Down
10 changes: 8 additions & 2 deletions src/main/resources/application.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
spring:
datasource:
url: jdbc:h2:tcp://localhost/~/interviewPrep;MODE=LEGACY;
url: jdbc:h2:tcp://localhost/~/interviewPrep;MODE=MySQL;DB_CLOSE_DELAY=-1;DB_CLOSE_ON_EXIT=FALSE
username: sa
password:

Expand All @@ -16,6 +16,10 @@ spring:
host: localhost
port: 6379

flyway:
enabled: true
baseline-on-migrate: true

logging:
level:
org.hibernate.SQL: debug
Expand All @@ -35,4 +39,6 @@ spring:

redis:
host: redis-server
port: 6379
port: 6379


Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
-- V2023.08.01.20.15.10__init_schema.sql

CREATE TABLE member (
MEMBER_ID BIGINT AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(255) NOT NULL,
password VARCHAR(255) NOT NULL,
type VARCHAR(255) NOT NULL,
nickName VARCHAR(255) NOT NULL,
name VARCHAR(255) NOT NULL,
picture VARCHAR(255),
role VARCHAR(50) NOT NULL
);

CREATE INDEX index_member_email ON member (email);