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

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:
2026-11-23 00:57:18 -05:00
co-authored by Claude Opus 5.5
parent 13df3d756d
commit 285a24f0ab
247 changed files with 1480 additions and 4200 deletions
+2 -2
View File
@@ -120,8 +120,8 @@ type ListTracksNeedingAcoustIDLookupRow struct {
DurationMs int32
}
// AcoustID recording-id lookup. Migration 0069 says what each
// lookup state means.
// AcoustID recording-id lookup. The CHECK on track_acoustid_lookups.state
// lists the lookup states.
// The lookup worker's queue: present tracks with no tag MBID and no lookup
// since their file last changed. A looked-up id is included once its row is
// gone (the file changed), so the new bytes are checked rather than trusted.
+1 -1
View File
@@ -51,7 +51,7 @@ type UpdateFingerprintSettingsParams struct {
AutoResolve bool
}
// Whole-row write from the admin card; migration 0061's CHECKs are the backstop
// Whole-row write from the admin card; fingerprint_settings's CHECKs are the backstop
// behind the service's own validation.
func (q *Queries) UpdateFingerprintSettings(ctx context.Context, arg UpdateFingerprintSettingsParams) (FingerprintSetting, error) {
row := q.db.QueryRow(ctx, updateFingerprintSettings,
+1 -1
View File
@@ -89,7 +89,7 @@ type ListMissingTrackPairsRow struct {
// they are different recordings. The caller folds a pair only when each side has
// exactly one candidate; anything else is ambiguous and left alone.
//
// A slot the duplicate resolver emptied (emptied_at, migration 0095) pairs by
// A slot the duplicate resolver emptied (emptied_at) pairs by
// title only with a track added since: the album held no copy of the song as
// long as it is, so one already there under the title is another song.
func (q *Queries) ListMissingTrackPairs(ctx context.Context) ([]ListMissingTrackPairsRow, error) {
+1 -1
View File
@@ -61,7 +61,7 @@ type UpsertNormalizationPrefsRow struct {
UpdatedAt pgtype.Timestamptz
}
// Whole-row write from either client; the CHECKs in migration 0067 back the
// Whole-row write from either client; the CHECKs on user_normalization_prefs back the
// handler's own validation.
func (q *Queries) UpsertNormalizationPrefs(ctx context.Context, arg UpsertNormalizationPrefsParams) (UpsertNormalizationPrefsRow, error) {
row := q.db.QueryRow(ctx, upsertNormalizationPrefs,
+1 -1
View File
@@ -463,7 +463,7 @@ type UpdateNotificationEmailSettingsParams struct {
BatchWindowMinutes int32
}
// Migration 0074's CHECKs are the backstop behind the service's validation.
// notification_email_settings's CHECKs are the backstop behind the service's validation.
func (q *Queries) UpdateNotificationEmailSettings(ctx context.Context, arg UpdateNotificationEmailSettingsParams) (NotificationEmailSetting, error) {
row := q.db.QueryRow(ctx, updateNotificationEmailSettings, arg.SummaryHour, arg.BatchWindowMinutes)
var i NotificationEmailSetting
+1 -1
View File
@@ -34,7 +34,7 @@ type LinkTracksAsSongRow struct {
}
// Song links: copies of one song on different releases share a
// song_key (migration 0076).
// song_key.
// Links the tracks into one song, joining any songs they already belong to.
// The song keeps the lowest key among them, so linking the same set again
// changes nothing. Returns that key and how many tracks moved to it.
+1 -1
View File
@@ -1021,7 +1021,7 @@ UPDATE tracks
`
// Stamps rows the duplicate resolver emptied, whose song the album holds no
// other copy of, with the time they went missing (migration 0095): missing-pair
// other copy of, with the time they went missing (emptied_at): missing-pair
// folding then waits for a copy fetched again.
func (q *Queries) MarkTracksEmptied(ctx context.Context, ids []pgtype.UUID) error {
_, err := q.db.Exec(ctx, markTracksEmptied, ids)
+1 -1
View File
@@ -572,7 +572,7 @@ type SetSubsonicPasswordParams struct {
}
// Stores (or clears with NULL) the per-user Subsonic legacy credential used
// for t/s and p auth on /rest/*. Must be plaintext; see migration 0003. Only
// for t/s and p auth on /rest/*. Must be plaintext: t/s auth hashes it with a salt. Only
// ever a server-generated value, never the login password.
func (q *Queries) SetSubsonicPassword(ctx context.Context, arg SetSubsonicPasswordParams) error {
_, err := q.db.Exec(ctx, setSubsonicPassword, arg.ID, arg.SubsonicPassword)