diff --git a/internal/config/model.go b/internal/config/model.go index f1708f4..8b41df8 100644 --- a/internal/config/model.go +++ b/internal/config/model.go @@ -5,15 +5,12 @@ import "time" // ConfigEntry stores runtime-tunable configuration in the database. // Values are stored as strings but helpers exist for ints/bools/durations. // -// NOTE: keep keys stable; they are effectively part of the public admin surface. -// // Example keys: // - upload.max_file_size_bytes // - upload.multi.max_files // - upload.max_hours // - ratelimit.login.per_minute // - ratelimit.api.per_minute -// type ConfigEntry struct { Key string `gorm:"primaryKey;size:128"` Value string `gorm:"size:2048"` diff --git a/internal/config/repository.go b/internal/config/repository.go index b836c5e..4f5cfb1 100644 --- a/internal/config/repository.go +++ b/internal/config/repository.go @@ -19,7 +19,6 @@ func (r *Repository) Get(key string) (*ConfigEntry, error) { } func (r *Repository) Upsert(key, value string) error { - // Prefer a simple approach that works across sqlite/postgres/mysql. // Try update first, then insert if nothing updated. res := r.db.Model(&ConfigEntry{}).Where("key = ?", key).Update("value", value) if res.Error != nil {