-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: 채팅 메시지 최대 길이 설정 #157
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -31,7 +31,7 @@ public class ChatMessage extends BaseEntity { | |
| private Integer id; | ||
|
|
||
| @NotNull | ||
| @Column(name = "content", nullable = false, columnDefinition = "TEXT") | ||
| @Column(name = "content", nullable = false, length = 1000) | ||
|
||
| private String content; | ||
|
|
||
| @Column(name = "is_read", nullable = false) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1 @@ | ||
| ALTER TABLE chat_message MODIFY COLUMN content VARCHAR(1000) NOT NULL; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
엔티티 정의를 TEXT에서 VARCHAR(1000)으로 변경했지만, 데이터베이스 마이그레이션 스크립트가 포함되지 않았습니다. Flyway를 사용하는 프로젝트이므로, src/main/resources/db/migration/ 디렉토리에 새로운 마이그레이션 파일(예: V17__alter_chat_message_content_length.sql)을 추가하여 실제 데이터베이스 스키마도 변경해야 합니다.
마이그레이션 스크립트 예시:
ALTER TABLE chat_message MODIFY COLUMN content VARCHAR(1000) NOT NULL;