generated from pricelees/issue-pr-template
[#37] 테마 스키마 재정의 #38
@ -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
|
||||
|
||||
|
||||
@ -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,
|
||||
|
||||
@ -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,
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user