diff --git a/backend/src/main/java/com/festago/festival/domain/Festival.java b/backend/src/main/java/com/festago/festival/domain/Festival.java index 4d2a013d2..64602cc87 100644 --- a/backend/src/main/java/com/festago/festival/domain/Festival.java +++ b/backend/src/main/java/com/festago/festival/domain/Festival.java @@ -39,7 +39,6 @@ public class Festival extends BaseTimeEntity { @Size(max = 255) private String thumbnail; - @NotNull @ManyToOne(fetch = FetchType.LAZY) private School school; diff --git a/backend/src/main/java/com/festago/ticket/domain/Ticket.java b/backend/src/main/java/com/festago/ticket/domain/Ticket.java index 67f1604cf..fe873d0ff 100644 --- a/backend/src/main/java/com/festago/ticket/domain/Ticket.java +++ b/backend/src/main/java/com/festago/ticket/domain/Ticket.java @@ -39,7 +39,6 @@ public class Ticket extends BaseTimeEntity { @ManyToOne(fetch = FetchType.LAZY) private Stage stage; - @NotNull private Long schoolId; @NotNull diff --git a/backend/src/main/resources/db/migration/V4__add_school_fk.sql b/backend/src/main/resources/db/migration/V4__add_school_fk.sql index 42a816f19..bcdb2f62a 100644 --- a/backend/src/main/resources/db/migration/V4__add_school_fk.sql +++ b/backend/src/main/resources/db/migration/V4__add_school_fk.sql @@ -1,5 +1,5 @@ alter table ticket - add column school_id bigint not null; + add column school_id bigint; alter table ticket add constraint fk_ticket__school @@ -7,7 +7,7 @@ alter table ticket references school (id); alter table festival - add column school_id bigint not null; + add column school_id bigint; alter table festival add constraint fk_festival__school