[#52] 만료 예약 / 일정 스케쥴링 작업 추가 및 동시성 처리를 위한 일부 코드 수정 #53

Merged
pricelees merged 18 commits from refactor/#52 into main 2025-10-04 08:40:37 +00:00
Showing only changes of commit 3748df9351 - Show all commits

View File

@ -128,7 +128,9 @@ create table if not exists schedule (
constraint uk_schedule__store_id_date_time_theme_id unique (store_id, date, time, theme_id), constraint uk_schedule__store_id_date_time_theme_id unique (store_id, date, time, theme_id),
constraint fk_schedule__store_id foreign key (store_id) references store (id), constraint fk_schedule__store_id foreign key (store_id) references store (id),
constraint fk_schedule__theme_id foreign key (theme_id) references theme (id) constraint fk_schedule__theme_id foreign key (theme_id) references theme (id),
index idx_schedule__status_hold_expired_at (status, hold_expired_at, id),
index idx_schedule__status_date_theme_id_id (status, date, theme_id, id)
); );
create table if not exists reservation ( create table if not exists reservation (
@ -146,7 +148,9 @@ create table if not exists reservation (
updated_by bigint not null, updated_by bigint not null,
constraint fk_reservation__user_id foreign key (user_id) references users (id), constraint fk_reservation__user_id foreign key (user_id) references users (id),
constraint fk_reservation__schedule_id foreign key (schedule_id) references schedule (id) constraint fk_reservation__schedule_id foreign key (schedule_id) references schedule (id),
index idx_reservation__schedule_id_status (schedule_id, status),
index idx_reservation__status_schedule_id_created_at (status, schedule_id, created_at)
); );
create table if not exists canceled_reservation ( create table if not exists canceled_reservation (