Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BE] refactor: Ticket 및 Festival의 school not null 제약조건 제거 (#464) #465

Merged
merged 3 commits into from
Sep 26, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class Festival extends BaseTimeEntity {
@Size(max = 255)
private String thumbnail;

@NotNull
@ManyToOne(fetch = FetchType.LAZY)
private School school;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public class Ticket extends BaseTimeEntity {
@ManyToOne(fetch = FetchType.LAZY)
private Stage stage;

@NotNull
private Long schoolId;

@NotNull
Expand Down
4 changes: 2 additions & 2 deletions backend/src/main/resources/db/migration/V4__add_school_fk.sql
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
alter table ticket
add column school_id bigint not null;
add column school_id bigint;

alter table ticket
add constraint fk_ticket__school
foreign key (school_id)
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
Expand Down
Loading