feat(db): drop the acquisition and Discover tables
release / web (push) Successful in 1m22s
release / go (push) Successful in 1m49s
release / govulncheck (push) Successful in 18s
release / integration (push) Successful in 4m10s
release / android (push) Successful in 4m27s
release / Build signed APK (push) Successful in 4m56s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 22s
release / Verify release artifacts (tag releases only) (push) Skipped

Migration 105 removes the tables the acquisition and Discover features
kept, and users.auto_approve_requests. Before library_album_matches goes,
an album with no release-group MBID takes the one its match listed.
Tables drop without CASCADE, in reference order, so a reference from a
table that stays stops the migration. The down migration refuses: the
data is gone, and a backup from before it is the way back.

The backup table list, the test reset list and the duplicate and user
queries follow.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
2026-11-23 00:20:22 -05:00
co-authored by Claude Opus 5.5
parent 741c748135
commit 8c6bbac48d
13 changed files with 84 additions and 387 deletions
+1 -2
View File
@@ -221,7 +221,7 @@ SELECT g.id AS group_id,
AND t.track_number IS NOT NULL
AND o.disc_number IS NOT DISTINCT FROM t.disc_number
AND o.track_number = t.track_number)::boolean AS position_clash,
COALESCE(NULLIF(al.release_group_mbid, ''), lam.release_group_mbid, '')::text AS release_group_mbid,
COALESCE(al.release_group_mbid, '')::text AS release_group_mbid,
l.state AS acoustid_state,
l.recording_mbid AS acoustid_recording
FROM duplicate_groups g
@@ -229,7 +229,6 @@ SELECT g.id AS group_id,
JOIN tracks t ON t.id = m.track_id
JOIN artists ON artists.id = t.artist_id
JOIN albums al ON al.id = t.album_id
LEFT JOIN library_album_matches lam ON lam.album_id = t.album_id AND lam.outcome = 'listed'
LEFT JOIN track_acoustid_lookups l ON l.track_id = t.id
WHERE g.status = 'pending'
AND t.missing_since IS NULL