-
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.
* feat: JPA & DB 프로퍼티 변경 * feat: init DDL 생성
- Loading branch information
Showing
3 changed files
with
85 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,13 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project version="4"> | ||
<component name="DatabaseMigrationSettings" lastSelectedDirectory="src/main/resources" /> | ||
<component name="PersistenceUnitSettings"> | ||
<persistence-units> | ||
<persistence-unit moduleName="depromeet-makers-be.main" name="Default" defaultSearchScope="Project"> | ||
<packages> | ||
<package value="com.depromeet.makers" /> | ||
</packages> | ||
</persistence-unit> | ||
</persistence-units> | ||
</component> | ||
</project> |
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,54 @@ | ||
CREATE TABLE attendances | ||
( | ||
id CHAR(26) NOT NULL, | ||
generation INT NOT NULL, | ||
week INT NOT NULL, | ||
member_id CHAR(26) NOT NULL, | ||
session_type VARCHAR(255) NOT NULL, | ||
attendance_status VARCHAR(255) NOT NULL, | ||
attendance_time datetime NULL, | ||
CONSTRAINT pk_attendances PRIMARY KEY (id) | ||
); | ||
|
||
CREATE TABLE member | ||
( | ||
id CHAR(26) NOT NULL, | ||
name VARCHAR(255) NOT NULL, | ||
email VARCHAR(255) NOT NULL, | ||
passcord VARCHAR(255) NULL, | ||
CONSTRAINT pk_member PRIMARY KEY (id) | ||
); | ||
|
||
CREATE TABLE member_generation | ||
( | ||
member_id CHAR(26) NOT NULL, | ||
generation_id INT NOT NULL, | ||
group_id INT NULL, | ||
`role` VARCHAR(255) NOT NULL, | ||
position VARCHAR(255) NOT NULL, | ||
CONSTRAINT pk_member_generation PRIMARY KEY (member_id, generation_id) | ||
); | ||
|
||
CREATE TABLE session | ||
( | ||
id CHAR(26) NOT NULL, | ||
generation INT NOT NULL, | ||
week INT NOT NULL, | ||
title VARCHAR(255) NOT NULL, | ||
`description` VARCHAR(255) NOT NULL, | ||
start_time datetime NOT NULL, | ||
session_type VARCHAR(255) NOT NULL, | ||
address VARCHAR(255) NULL, | ||
longitude DOUBLE NULL, | ||
latitude DOUBLE NULL, | ||
CONSTRAINT pk_session PRIMARY KEY (id) | ||
); | ||
|
||
ALTER TABLE member | ||
ADD CONSTRAINT uc_member_email UNIQUE (email); | ||
|
||
ALTER TABLE attendances | ||
ADD CONSTRAINT FK_ATTENDANCES_ON_MEMBER FOREIGN KEY (member_id) REFERENCES member (id); | ||
|
||
ALTER TABLE member_generation | ||
ADD CONSTRAINT FK_MEMBER_GENERATION_ON_MEMBER FOREIGN KEY (member_id) REFERENCES member (id); |
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