Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] ERD svg 생성하여 스키마 변경에 대한 이력 관리 #190

Merged
merged 2 commits into from
Aug 4, 2024
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
65 changes: 65 additions & 0 deletions server/docs/24-08-04-erd.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
-- Create tables
CREATE TABLE action
(
event_id BIGINT,
id BIGINT AUTO_INCREMENT,
sequence BIGINT,
PRIMARY KEY (id)
);

CREATE TABLE bill_action
(
action_id BIGINT UNIQUE,
id BIGINT AUTO_INCREMENT,
price BIGINT,
title VARCHAR(30),
PRIMARY KEY (id)
);

CREATE TABLE event
(
id BIGINT AUTO_INCREMENT,
name VARCHAR(255),
token VARCHAR(255),
PRIMARY KEY (id)
);

CREATE TABLE event_step
(
event_id BIGINT,
id BIGINT AUTO_INCREMENT,
sequence BIGINT,
name VARCHAR(255),
PRIMARY KEY (id)
);

CREATE TABLE member_action
(
action_id BIGINT UNIQUE,
id BIGINT AUTO_INCREMENT,
member_group_id BIGINT,
member_name VARCHAR(255),
status ENUM('IN', 'OUT'),
PRIMARY KEY (id)
);

-- Add foreign key constraints
ALTER TABLE action
ADD CONSTRAINT FKgf0qmub9va1xbe44nehny31yw
FOREIGN KEY (event_id)
REFERENCES event (id);

ALTER TABLE bill_action
ADD CONSTRAINT FK54tx517tp0ry6453olkply4us
FOREIGN KEY (action_id)
REFERENCES action (id);

ALTER TABLE event_step
ADD CONSTRAINT FKe3rkib91cvl0x5w9wqkshmn81
FOREIGN KEY (event_id)
REFERENCES event (id);

ALTER TABLE member_action
ADD CONSTRAINT FK5jna51dn8fs2ir52l4uwn517u
FOREIGN KEY (action_id)
REFERENCES action (id);
4 changes: 4 additions & 0 deletions server/docs/24-08-04-erd.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading