fix: username 컬럼 타입을 varchar(100)으로 명시
All checks were successful
Server CI/CD / deploy (push) Successful in 38s

longtext 타입은 MySQL에서 uniqueIndex를 걸 수 없어
AutoMigrate 실패 및 announcements 테이블 미생성 문제 해결

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
2026-02-24 14:24:37 +09:00
parent 2cac2dcfb3
commit bf17d4d1da

View File

@@ -11,7 +11,7 @@ const (
type User struct {
gorm.Model
Username string `gorm:"uniqueIndex;not null"`
Username string `gorm:"type:varchar(100);uniqueIndex;not null"`
PasswordHash string `gorm:"not null"`
Role Role `gorm:"default:'user'"`
}