forked from codesquad-members-2022/sidedish
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
2 changed files
with
51 additions
and
0 deletions.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
spring: | ||
datasource: | ||
driverClassName: org.h2.Driver | ||
url: jdbc:h2:mem:testdb | ||
username: sa | ||
sql: | ||
init: | ||
mode: always | ||
schema-locations: classpath:testDB/schema.sql | ||
# data-locations: classpath:testDB/data.sql | ||
h2: | ||
console: | ||
enabled: true | ||
path: /h2-console | ||
mvc: | ||
pathmatch: | ||
matching-strategy: ant_path_matcher | ||
|
||
logging: | ||
level: | ||
web: DEBUG |
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,30 @@ | ||
DROP TABLE IF EXISTS dish; | ||
CREATE TABLE dish | ||
( | ||
dish_id BIGINT NOT NULL PRIMARY KEY AUTO_INCREMENT, | ||
name VARCHAR(255) NULL, | ||
description VARCHAR(255) NULL, | ||
normal_price DECIMAL NULL, | ||
sale_price DECIMAL NULL, | ||
badge VARCHAR(255) NULL, | ||
delivery_type VARCHAR(255) NULL, | ||
thumbnail VARCHAR(255) NULL, | ||
category_id BIGINT NOT NULL, | ||
dish_status VARCHAR(255) NULL | ||
); | ||
|
||
|
||
DROP TABLE IF EXISTS category; | ||
CREATE TABLE category | ||
( | ||
category_id BIGINT NOT NULL PRIMARY KEY, | ||
title VARCHAR(255) | ||
); | ||
|
||
DROP TABLE IF EXISTS users; | ||
CREATE TABLE users | ||
( | ||
user_id BIGINT NOT NULL PRIMARY KEY, | ||
login_id BIGINT NOT NULL, | ||
password VARCHAR(60) NOT NULL | ||
); |