diff --git a/src/main/java/net/teumteum/alert/domain/Alert.java b/src/main/java/net/teumteum/alert/domain/Alert.java index cf5459e..e8f828e 100644 --- a/src/main/java/net/teumteum/alert/domain/Alert.java +++ b/src/main/java/net/teumteum/alert/domain/Alert.java @@ -28,10 +28,10 @@ public class Alert extends TimeBaseEntity { @Column(name = "user_id", nullable = false) private Long userId; - @Column(name = "title", nullable = false, length = 20) + @Column(name = "title", nullable = false) private String title; - @Column(name = "body", nullable = false, length = 20) + @Column(name = "body", nullable = false) private String body; @Column(name = "type") diff --git a/src/main/resources/db/migration/V15__alter_alert_title_and_body.sql b/src/main/resources/db/migration/V15__alter_alert_title_and_body.sql new file mode 100644 index 0000000..24d7df9 --- /dev/null +++ b/src/main/resources/db/migration/V15__alter_alert_title_and_body.sql @@ -0,0 +1,4 @@ +alter table alert drop column title; +alter table alert drop column `body`; +alter table alert add column title text not null; +alter table alert add column `body` text not null; diff --git a/src/test/resources/schema.sql b/src/test/resources/schema.sql index 072cc89..b8087e3 100644 --- a/src/test/resources/schema.sql +++ b/src/test/resources/schema.sql @@ -97,8 +97,8 @@ create table if not exists users_reviews create table if not exists alert( id bigint not null auto_increment, user_id bigint not null, - title varchar(20) not null, - `body` varchar(20) not null, + title text not null, + `body` text not null, type enum('BEFORE_MEETING'), created_at timestamp(6) not null, updated_at timestamp(6) not null,