Skip to content

Commit

Permalink
[BE] feat: Festival, Ticket 테이블의 school_id의 not null 제약조건 추가(#468) (#469
Browse files Browse the repository at this point in the history
)

* refactor: Ticket,Festival 도메인 School notnull 제약사항 추가

* feat: flyway sql 추가
  • Loading branch information
xxeol2 authored and BGuga committed Oct 17, 2023
1 parent c5d3472 commit 797d83f
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,7 @@ 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 @@ -42,6 +42,7 @@ public class Ticket extends BaseTimeEntity {
@ManyToOne(fetch = FetchType.LAZY)
private Stage stage;

@NotNull
private Long schoolId;

@NotNull
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
alter table festival
modify school_id bigint not null;

alter table ticket
modify school_id bigint not null;

0 comments on commit 797d83f

Please sign in to comment.