From fff132549dba4b4557a665cb54efbdf3a0143bfc Mon Sep 17 00:00:00 2001 From: xxeol2 Date: Thu, 5 Oct 2023 03:47:55 +0900 Subject: [PATCH] =?UTF-8?q?feat:=20flyway=20=EC=B6=94=EA=B0=80?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/festago/entryalert/domain/EntryAlert.java | 3 +++ backend/src/main/resources/db/migration/V6__entry_alert.sql | 3 +++ 2 files changed, 6 insertions(+) diff --git a/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java b/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java index 022d1d28d..177cd9c8a 100644 --- a/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java +++ b/backend/src/main/java/com/festago/entryalert/domain/EntryAlert.java @@ -4,6 +4,8 @@ import com.festago.common.exception.BadRequestException; import com.festago.common.exception.ErrorCode; import jakarta.persistence.Entity; +import jakarta.persistence.EnumType; +import jakarta.persistence.Enumerated; import jakarta.persistence.GeneratedValue; import jakarta.persistence.GenerationType; import jakarta.persistence.Id; @@ -26,6 +28,7 @@ public class EntryAlert extends BaseTimeEntity { private LocalDateTime entryTime; @NotNull + @Enumerated(value = EnumType.STRING) private AlertStatus status = AlertStatus.PENDING; protected EntryAlert() { diff --git a/backend/src/main/resources/db/migration/V6__entry_alert.sql b/backend/src/main/resources/db/migration/V6__entry_alert.sql index 37f2e15f2..33f04f892 100644 --- a/backend/src/main/resources/db/migration/V6__entry_alert.sql +++ b/backend/src/main/resources/db/migration/V6__entry_alert.sql @@ -1,8 +1,11 @@ create table if not exists entry_alert ( id bigint not null auto_increment, + created_at datetime(6), + updated_at datetime(6), entry_time datetime(6) not null, stage_id bigint not null, + status varchar(255) not null, primary key (id) ) engine innodb default charset = utf8mb4