Skip to content

Commit

Permalink
feat: 컬럼 추가 및 컬럼명 수정
Browse files Browse the repository at this point in the history
  • Loading branch information
hun-ca committed Jun 9, 2024
1 parent 3fbf063 commit 08238ee
Showing 1 changed file with 15 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ CREATE TABLE user
(
id BIGINT NOT NULL AUTO_INCREMENT,
email VARCHAR(255) NOT NULL,
type TINYINT NOT NULL,
type_cd TINYINT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id),
Expand Down Expand Up @@ -35,12 +35,12 @@ CREATE TABLE article_ifo
-- 학습지
CREATE TABLE workbook
(
id BIGINT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
category TINYINT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
id BIGINT NOT NULL AUTO_INCREMENT,
name VARCHAR(255) NOT NULL,
title VARCHAR(255) NOT NULL,
category_cd TINYINT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id)
);

Expand Down Expand Up @@ -75,6 +75,7 @@ CREATE TABLE problem
content JSON NOT NULL,
answer TINYINT NOT NULL,
explanation VARCHAR(255) NOT NULL,
creator_id BIGINT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id),
Expand All @@ -84,12 +85,13 @@ CREATE TABLE problem
-- 풀이 히스토리
CREATE TABLE solve_history
(
id BIGINT NOT NULL AUTO_INCREMENT,
problem_id BIGINT NOT NULL,
user_id BIGINT NOT NULL,
selected_answer TINYINT NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
id BIGINT NOT NULL AUTO_INCREMENT,
problem_id BIGINT NOT NULL,
user_id BIGINT NOT NULL,
choice_ans TINYINT NOT NULL,
is_solved bit(1) NOT NULL,
created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP,
deleted_at TIMESTAMP NULL DEFAULT NULL,
PRIMARY KEY (id),
UNIQUE (problem_id, user_id)
);
Expand Down

0 comments on commit 08238ee

Please sign in to comment.