From 5ed632b1b321815b0adf5d63df081bf5977bd8bf Mon Sep 17 00:00:00 2001 From: pricelees Date: Wed, 27 Aug 2025 16:16:37 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20=ED=85=8C=EB=A7=88=20=EC=8A=A4=ED=82=A4?= =?UTF-8?q?=EB=A7=88=20=EC=9E=AC=EC=A0=95=EC=9D=98=20=EB=B0=8F=20=EC=97=94?= =?UTF-8?q?=ED=8B=B0=ED=8B=B0=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../roomescape/RoomescapeApplication.kt | 2 -- src/main/resources/schema/schema-h2.sql | 21 +++++++++++++++++++ src/main/resources/schema/schema-mysql.sql | 21 +++++++++++++++++++ 3 files changed, 42 insertions(+), 2 deletions(-) diff --git a/src/main/kotlin/roomescape/RoomescapeApplication.kt b/src/main/kotlin/roomescape/RoomescapeApplication.kt index be15c160..aca20d20 100644 --- a/src/main/kotlin/roomescape/RoomescapeApplication.kt +++ b/src/main/kotlin/roomescape/RoomescapeApplication.kt @@ -3,9 +3,7 @@ package roomescape import org.springframework.boot.Banner import org.springframework.boot.SpringApplication import org.springframework.boot.autoconfigure.SpringBootApplication -import org.springframework.data.jpa.repository.config.EnableJpaAuditing -@EnableJpaAuditing @SpringBootApplication class RoomescapeApplication diff --git a/src/main/resources/schema/schema-h2.sql b/src/main/resources/schema/schema-h2.sql index 05b334c2..a9c09b07 100644 --- a/src/main/resources/schema/schema-h2.sql +++ b/src/main/resources/schema/schema-h2.sql @@ -27,6 +27,27 @@ create table if not exists themes ( last_modified_at timestamp ); +create table if not exists theme ( + id bigint primary key , + name varchar(30) not null, + difficulty varchar(20) not null, + description varchar(255) not null, + thumbnail_url varchar(255) not null, + price int not null, + min_participants smallint not null, + max_participants smallint not null, + available_minutes smallint not null, + expected_minutes_from smallint not null, + expected_minutes_to smallint not null, + created_at timestamp not null, + created_by bigint not null, + updated_at timestamp not null, + updated_by bigint not null, + + constraint fk_theme__created_by foreign key (created_by) references members (member_id), + constraint fk_theme__updated_by foreign key (updated_by) references members (member_id) +); + create table if not exists times ( time_id bigint primary key, start_at time not null, diff --git a/src/main/resources/schema/schema-mysql.sql b/src/main/resources/schema/schema-mysql.sql index 4ebb1079..d3b60713 100644 --- a/src/main/resources/schema/schema-mysql.sql +++ b/src/main/resources/schema/schema-mysql.sql @@ -29,6 +29,27 @@ create table if not exists themes last_modified_at datetime(6) null ); +create table if not exists theme ( + id bigint primary key , + name varchar(30) not null, + difficulty varchar(20) not null, + description varchar(255) not null, + thumbnail_url varchar(255) not null, + price int not null, + min_participants smallint not null, + max_participants smallint not null, + available_minutes smallint not null, + expected_minutes_from smallint not null, + expected_minutes_to smallint not null, + created_at datetime(6) not null, + created_by bigint not null, + updated_at datetime(6) not null, + updated_by bigint not null, + + constraint fk_theme__created_by foreign key (created_by) references members (member_id), + constraint fk_theme__updated_by foreign key (updated_by) references members (member_id) +); + create table if not exists times ( time_id bigint primary key,