-
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.
user 테이블에 이미지 url 컬럼 추가 - avatar_url 테이블명 변경 - issue_has_label RDS 사용으로 전환
- Loading branch information
Showing
3 changed files
with
73 additions
and
69 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
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
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 |
---|---|---|
@@ -1,65 +1,66 @@ | ||
CREATE TABLE user ( | ||
id BIGINT AUTO_INCREMENT, | ||
name VARCHAR(128), | ||
email VARCHAR(128), | ||
github_id BIGINT, | ||
created_date_time DATETIME, | ||
PRIMARY KEY (id) | ||
); | ||
|
||
CREATE TABLE milestone ( | ||
id INT AUTO_INCREMENT, | ||
title VARCHAR(128), | ||
description VARCHAR(2048), | ||
due_date DATE, | ||
created_date_time DATETIME, | ||
updated_date_time DATETIME, | ||
PRIMARY KEY (id) | ||
); | ||
|
||
CREATE TABLE issue ( | ||
id BIGINT AUTO_INCREMENT, | ||
title VARCHAR(128), | ||
created_date_time DATETIME, | ||
is_opened BOOLEAN, | ||
user_id BIGINT, | ||
milestone_id INT, | ||
PRIMARY KEY (id), | ||
FOREIGN KEY (user_id) REFERENCES user (id), | ||
FOREIGN KEY (milestone_id) REFERENCES milestone (id) | ||
); | ||
|
||
CREATE TABLE label ( | ||
id INT, | ||
name VARCHAR(128), | ||
description VARCHAR(512), | ||
hex_code VARCHAR(64), | ||
PRIMARY KEY (id) | ||
); | ||
|
||
CREATE TABLE label_has_issue ( | ||
label_id INT, | ||
issue_id BIGINT, | ||
FOREIGN KEY (label_id) REFERENCES label (id), | ||
FOREIGN KEY (issue_id) REFERENCES issue (id) | ||
); | ||
|
||
CREATE TABLE assignee ( | ||
id INT AUTO_INCREMENT, | ||
issue_id BIGINT, | ||
user_id BIGINT, | ||
PRIMARY KEY (id), | ||
FOREIGN KEY (issue_id) REFERENCES issue (id), | ||
FOREIGN KEY (user_id) REFERENCES user (id) | ||
); | ||
|
||
CREATE TABLE comment ( | ||
id BIGINT AUTO_INCREMENT, | ||
description VARCHAR(2048), | ||
created_date_time DATETIME, | ||
issue_id BIGINT, | ||
user_id BIGINT, | ||
PRIMARY KEY (id), | ||
FOREIGN KEY (issue_id) REFERENCES issue (id), | ||
FOREIGN KEY (user_id) REFERENCES user (id) | ||
); | ||
-- CREATE TABLE IF NOT EXISTS user ( | ||
-- id BIGINT AUTO_INCREMENT, | ||
-- name VARCHAR(128), | ||
-- email VARCHAR(128), | ||
-- github_id BIGINT, | ||
-- avatar_url VARCHAR(256), | ||
-- created_date_time DATETIME, | ||
-- PRIMARY KEY (id) | ||
-- ); | ||
-- | ||
-- CREATE TABLE IF NOT EXISTS milestone ( | ||
-- id INT AUTO_INCREMENT, | ||
-- title VARCHAR(128), | ||
-- description VARCHAR(2048), | ||
-- due_date DATE, | ||
-- created_date_time DATETIME, | ||
-- updated_date_time DATETIME, | ||
-- PRIMARY KEY (id) | ||
-- ); | ||
-- | ||
-- CREATE TABLE IF NOT EXISTS issue ( | ||
-- id BIGINT AUTO_INCREMENT, | ||
-- title VARCHAR(128), | ||
-- created_date_time DATETIME, | ||
-- is_opened BOOLEAN, | ||
-- user_id BIGINT, | ||
-- milestone_id INT, | ||
-- PRIMARY KEY (id), | ||
-- FOREIGN KEY (user_id) REFERENCES user (id), | ||
-- FOREIGN KEY (milestone_id) REFERENCES milestone (id) | ||
-- ); | ||
-- | ||
-- CREATE TABLE IF NOT EXISTS label ( | ||
-- id INT AUTO_INCREMENT, | ||
-- name VARCHAR(128), | ||
-- description VARCHAR(512), | ||
-- hex_code VARCHAR(64), | ||
-- PRIMARY KEY (id) | ||
-- ); | ||
-- | ||
-- CREATE TABLE IF NOT EXISTS issue_has_label ( | ||
-- label_id INT, | ||
-- issue_id BIGINT, | ||
-- FOREIGN KEY (label_id) REFERENCES label (id), | ||
-- FOREIGN KEY (issue_id) REFERENCES issue (id) | ||
-- ); | ||
-- | ||
-- CREATE TABLE IF NOT EXISTS assignee ( | ||
-- id INT AUTO_INCREMENT, | ||
-- issue_id BIGINT, | ||
-- user_id BIGINT, | ||
-- PRIMARY KEY (id), | ||
-- FOREIGN KEY (issue_id) REFERENCES issue (id), | ||
-- FOREIGN KEY (user_id) REFERENCES user (id) | ||
-- ); | ||
-- | ||
-- CREATE TABLE IF NOT EXISTS comment ( | ||
-- id BIGINT AUTO_INCREMENT, | ||
-- description VARCHAR(2048), | ||
-- created_date_time DATETIME, | ||
-- issue_id BIGINT, | ||
-- user_id BIGINT, | ||
-- PRIMARY KEY (id), | ||
-- FOREIGN KEY (issue_id) REFERENCES issue (id), | ||
-- FOREIGN KEY (user_id) REFERENCES user (id) | ||
-- ); |