feat(db): fold every migration into one baseline at version 106
release / web (push) Successful in 1m13s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 3m56s
release / android (push) Successful in 4m19s
release / Build signed APK (push) Successful in 4m40s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 14s
release / Verify release artifacts (tag releases only) (push) Skipped
release / web (push) Successful in 1m13s
release / go (push) Successful in 1m48s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 3m56s
release / android (push) Successful in 4m19s
release / Build signed APK (push) Successful in 4m40s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 14s
release / Verify release artifacts (tag releases only) (push) Skipped
0106_baseline.up.sql is the schema at version 106 and the settings rows it starts with, taken from a database migrated through 0001–0106; a database built from the baseline alone dumps identically. A database already at 106 skips it. Comments that pointed at a migration number now name the table or constraint instead. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -29,7 +29,7 @@ type LoudnessSettings struct {
|
||||
UpdatedAt time.Time
|
||||
}
|
||||
|
||||
// DefaultLoudnessSettings mirrors migrations 0065 and 0068's column defaults,
|
||||
// DefaultLoudnessSettings mirrors loudness_settings's column defaults,
|
||||
// so a database that cannot be read still analyzes the way a fresh install
|
||||
// does.
|
||||
var DefaultLoudnessSettings = LoudnessSettings{
|
||||
@@ -38,14 +38,14 @@ var DefaultLoudnessSettings = LoudnessSettings{
|
||||
LeveledCacheMB: 2048,
|
||||
}
|
||||
|
||||
// The leveled-stream cache's bounds, as migration 0068's CHECK has them.
|
||||
// The leveled-stream cache's bounds, as loudness_settings's CHECK has them.
|
||||
const (
|
||||
minLeveledCacheMB = 256
|
||||
maxLeveledCacheMB = 65536
|
||||
)
|
||||
|
||||
// ErrLoudnessSettingOutOfRange is returned by Set for a value migration 0065's
|
||||
// CHECK would reject, so the API answers 400 naming the field.
|
||||
// ErrLoudnessSettingOutOfRange is returned by Set for a value loudness_settings's
|
||||
// CHECKs would reject, so the API answers 400 naming the field.
|
||||
var ErrLoudnessSettingOutOfRange = errors.New("loudness setting out of range")
|
||||
|
||||
// LoudnessSettingsService caches the settings and owns their persistence.
|
||||
|
||||
Reference in New Issue
Block a user