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
-271
View File
@@ -196,46 +196,6 @@ type AcoustidSetting struct {
UpdatedAt pgtype.Timestamptz
}
type AcquisitionService struct {
Code string
Kind string
Protocol string
Label string
Enabled bool
BaseUrl string
ApiKey string
Username string
Password string
Category string
TimeoutMs int32
ServesSearch bool
ServesDownloads bool
ServesEnrichment bool
LocalPath string
RemotePath string
SearchesPerHour int32
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type AcquisitionSetting struct {
ID bool
AutoGrab bool
SearchIntervalHours int32
AllowedQualities []string
LastPassAt pgtype.Timestamptz
LastPass []byte
UpdatedAt pgtype.Timestamptz
ImportRoot string
SeedRatio float32
SeedDays int32
StallHours int32
LibraryListingStartedAt pgtype.Timestamptz
LibraryListedAt pgtype.Timestamptz
LibraryUnlisted int32
UpgradeUntil string
}
type Album struct {
ID pgtype.UUID
Title string
@@ -289,15 +249,6 @@ type ArtistSimilarityFetch struct {
Returned int32
}
type ArtistSimilarityUnmatched struct {
SeedArtistID pgtype.UUID
CandidateMbid string
CandidateName string
Score float64
Source string
FetchedAt pgtype.Timestamptz
}
type AuditLog struct {
ID pgtype.UUID
ActorID pgtype.UUID
@@ -345,19 +296,6 @@ type BackupSetting struct {
IncludeMusic bool
}
type CandidateArtistTag struct {
CandidateMbid string
Tag string
Weight float64
}
type CandidateArtistTagState struct {
CandidateMbid string
TagSource string
TagSourcesVersion int32
UpdatedAt pgtype.Timestamptz
}
type ContextualLike struct {
ID pgtype.UUID
UserID pgtype.UUID
@@ -395,30 +333,6 @@ type DiagnosticEvent struct {
ReceivedAt pgtype.Timestamptz
}
type DiscoverTuning struct {
Singleton bool
TagOverlapWeight float64
SnoozeDays float64
UpdatedAt pgtype.Timestamptz
}
type DownloadIntervention struct {
ID pgtype.UUID
Client string
InfoHash string
GrabID pgtype.UUID
Name string
Trigger string
Action string
Outcome string
Detail string
Observations int32
Remediations int32
FirstSeen pgtype.Timestamptz
LastSeen pgtype.Timestamptz
SettledAt pgtype.Timestamptz
}
type DuplicateGroup struct {
ID pgtype.UUID
MemberKey string
@@ -459,24 +373,6 @@ type FingerprintSetting struct {
AutoResolve bool
}
type Follow struct {
ArtistMbid string
ArtistName string
ProfileID pgtype.UUID
FollowedBy pgtype.UUID
FollowedAt pgtype.Timestamptz
BaselineAt pgtype.Timestamptz
WantExisting bool
CheckedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type FollowSeenGroup struct {
ArtistMbid string
ReleaseGroupMbid string
SeenAt pgtype.Timestamptz
}
type GeneralLike struct {
UserID pgtype.UUID
TrackID pgtype.UUID
@@ -495,49 +391,6 @@ type GeneralLikesArtist struct {
LikedAt pgtype.Timestamptz
}
type Grab struct {
ID pgtype.UUID
WantID pgtype.UUID
InfoHash string
Name string
Key string
Indexer string
Source string
Client string
SavePath string
Quality string
Origin string
Forced bool
GrabbedBy pgtype.UUID
GrabbedAt pgtype.Timestamptz
EndedAt pgtype.Timestamptz
EndReason string
EndDetail string
Progress float32
ImportState string
ImportReason string
ImportDetail []byte
ImportForced bool
ImportAttempts int32
ImportUpdatedAt pgtype.Timestamptz
ImportedAt pgtype.Timestamptz
ImportedFiles int32
Destination string
Seeding bool
Ratio float32
SeedReleasedAt pgtype.Timestamptz
}
type LibraryAlbumMatch struct {
AlbumID pgtype.UUID
Outcome string
Method string
ReleaseGroupMbid string
Detail string
DecidedAt pgtype.Timestamptz
Matcher int32
}
type LibraryChange struct {
ID int64
EntityType string
@@ -571,23 +424,6 @@ type LoudnessSetting struct {
LeveledCacheMb int32
}
type MbArtist struct {
Mbid string
Name string
SortName string
Disambiguation string
ArtistType string
Country string
DiscographyRefreshedAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type MbArtistReleaseGroup struct {
ArtistMbid string
ReleaseGroupMbid string
}
type MbRelease struct {
Mbid string
ReleaseGroupMbid string
@@ -735,13 +571,6 @@ type QuarantineAction struct {
CreatedAt pgtype.Timestamptz
}
type ReacquisitionSetting struct {
ID bool
Enabled bool
GraceHours int32
MaxPerPass int32
}
type RecommendationTuningAudit struct {
ID int64
ChangedAt pgtype.Timestamptz
@@ -769,49 +598,6 @@ type RegistrationSetting struct {
Mode string
}
type ReleaseBlock struct {
InfoHash string
Name string
Reason string
Detail string
WantID pgtype.UUID
BlockedBy pgtype.UUID
BlockedAt pgtype.Timestamptz
ExpiresAt pgtype.Timestamptz
}
type ReleaseTypeProfile struct {
ID pgtype.UUID
Name string
PrimaryTypes []string
SecondaryTypes []string
IsDefault bool
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type Request struct {
ID pgtype.UUID
UserID pgtype.UUID
Status RequestStatus
Kind RequestKind
ArtistMbid string
AlbumMbid *string
TrackMbid *string
ArtistName string
AlbumTitle *string
TrackTitle *string
DecidedAt pgtype.Timestamptz
DecidedBy pgtype.UUID
Notes *string
CompletedAt pgtype.Timestamptz
MatchedTrackID pgtype.UUID
MatchedAlbumID pgtype.UUID
MatchedArtistID pgtype.UUID
RequestedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
}
type ScanRun struct {
ID pgtype.UUID
StartedAt pgtype.Timestamptz
@@ -867,14 +653,6 @@ type SmtpConfig struct {
UpdatedAt pgtype.Timestamptz
}
type SuggestionSnooze struct {
UserID pgtype.UUID
CandidateMbid string
CandidateName string
SnoozedUntil pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
}
type SystemPlaylistRotationState struct {
UserID pgtype.UUID
PlaylistKind string
@@ -1037,7 +815,6 @@ type User struct {
ListenbrainzToken *string
ListenbrainzEnabled bool
DisplayName *string
AutoApproveRequests bool
Email *string
Timezone string
TimezoneUpdatedAt pgtype.Timestamptz
@@ -1092,54 +869,6 @@ type UserNotificationPref struct {
UpdatedAt pgtype.Timestamptz
}
type Want struct {
ID pgtype.UUID
ReleaseGroupMbid string
ArtistMbid string
ArtistName string
Title string
PrimaryType string
FirstReleaseDate string
Reason string
AlbumID pgtype.UUID
CreatedBy pgtype.UUID
WantedAt pgtype.Timestamptz
FulfilledAt pgtype.Timestamptz
CreatedAt pgtype.Timestamptz
UpdatedAt pgtype.Timestamptz
SearchedAt pgtype.Timestamptz
SearchOutcome string
SearchConsidered int32
BestRelease string
BestVerdict string
SearchError string
Upgrade string
HeldTier string
HeldQuality string
UpgradeCheckedAt pgtype.Timestamptz
}
type WantCandidate struct {
WantID pgtype.UUID
Key string
Name string
InfoHash string
Indexer string
Source string
SizeBytes int64
Seeders int32
FilesCount int32
Format string
Quality string
Year int32
Verdict string
Reason string
Reasons []byte
FoldedFrom []string
Rank int32
SearchedAt pgtype.Timestamptz
}
type YouMightLikeAlbum struct {
UserID pgtype.UUID
AlbumID pgtype.UUID