generated from pricelees/issue-pr-template
refactor: schedule 스키마의 기존 unique 제약조건에 storeId 추가
This commit is contained in:
parent
6b0c9709ed
commit
7cfc7a4d9f
@ -13,7 +13,7 @@ import java.time.LocalTime
|
|||||||
|
|
||||||
@Entity
|
@Entity
|
||||||
@EntityListeners(AuditingEntityListener::class)
|
@EntityListeners(AuditingEntityListener::class)
|
||||||
@Table(name = "schedule", uniqueConstraints = [UniqueConstraint(columnNames = ["date", "time", "theme_id"])])
|
@Table(name = "schedule", uniqueConstraints = [UniqueConstraint(columnNames = ["storeId", "date", "time", "theme_id"])])
|
||||||
class ScheduleEntity(
|
class ScheduleEntity(
|
||||||
id: Long,
|
id: Long,
|
||||||
|
|
||||||
|
|||||||
@ -125,7 +125,7 @@ create table if not exists schedule (
|
|||||||
updated_at timestamp not null,
|
updated_at timestamp not null,
|
||||||
updated_by bigint not null,
|
updated_by bigint not null,
|
||||||
|
|
||||||
constraint uk_schedule__date_time_theme_id unique (date, time, theme_id),
|
constraint uk_schedule__store_id_date_time_theme_id unique (store_id, date, time, theme_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)
|
||||||
);
|
);
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user