Skip to content

Commit

Permalink
[BE] refactor: Ticket의 school not null 제약조건 제거 (#465)
Browse files Browse the repository at this point in the history
* refactor: Ticket의 school not null 제약조건 제거

* refactor: Ticket의 school not null 제약조건 제거

* refactor: Festival의 school not null 제약조건 제거
  • Loading branch information
xxeol2 authored and BGuga committed Oct 17, 2023
1 parent fea9d88 commit ccaa1de
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 4 deletions.
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

0 comments on commit ccaa1de

Please sign in to comment.