Reduce field storage size by passing max length

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2024-03-24 13:45:20 +01:00
parent 8552cab0c2
commit 052c335cb2
Signed by: luzifer
SSH key fingerprint: SHA256:/xtE5lCgiRDQr8SLxHMS92ZBlACmATUmF1crK16Ks4E

View file

@ -2,13 +2,13 @@ package database
type ( type (
StreakMeta struct { StreakMeta struct {
Name string `gorm:"primaryKey"` Name string `gorm:"primaryKey;size:128"`
Value string Value string `gorm:"size:128"`
} }
StreakUser struct { StreakUser struct {
TwitchID uint64 `gorm:"primaryKey"` TwitchID uint64 `gorm:"primaryKey"`
Username string Username string `gorm:"size:128"`
StreamsCount uint64 StreamsCount uint64
CurrentStreak uint64 CurrentStreak uint64
MaxStreak uint64 MaxStreak uint64