Skip to content

Commit

Permalink
sql문 관리
Browse files Browse the repository at this point in the history
  • Loading branch information
HwiYul-G committed May 9, 2024
1 parent 31509eb commit 3b9a35e
Show file tree
Hide file tree
Showing 4 changed files with 29 additions and 28 deletions.
10 changes: 0 additions & 10 deletions src/main/resources/sql/article.sql

This file was deleted.

10 changes: 0 additions & 10 deletions src/main/resources/sql/comment.sql

This file was deleted.

29 changes: 29 additions & 0 deletions src/main/resources/sql/domain.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
USE board;

CREATE TABLE article(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
title VARCHAR(255),
content TEXT,
writer VARCHAR(255),
created_at DATETIME,
updated_at DATETIME
);

CREATE TABLE comment(
id BIGINT AUTO_INCREMENT PRIMARY KEY,
writer VARCHAR(255),
content TEXT,
created_at DATETIME,
updated_at DATETIME,
article_id BIGINT,
FOREIGN KEY (article_id) REFERENCES Article(id)
);

CREATE TABLE user (
id BIGINT AUTO_INCREMENT PRIMARY KEY,
email VARCHAR(45) UNIQUE NOT NULL,
password VARCHAR(255),
name VARCHAR(255),
nickname VARCHAR(255),
profile_image LONGBLOB
);
8 changes: 0 additions & 8 deletions src/main/resources/sql/user.sql

This file was deleted.

0 comments on commit 3b9a35e

Please sign in to comment.