release / govulncheck (push) Successful in 17s
release / web (push) Successful in 1m33s
release / go (push) Successful in 1m49s
release / integration (push) Successful in 5m42s
release / android (push) Successful in 5m59s
release / Build signed APK (releases and dev) (push) Successful in 6m9s
release / Attach APK to the Release (tag releases only) (push) Skipped
release / Build + push container image (push) Successful in 16s
release / Verify release artifacts (tag releases only) (push) Skipped
Applies rule 32's migration exception: each header still says what the schema was, what changes and what it prevents, but task, milestone, decision and rule ids are replaced by the practice they stood for, the operator quotes by the decision, single-install counts are dropped, and pointers to a deleted package and an external design doc are gone. golang-migrate keeps no checksum, so editing applied migrations' comments is safe. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
35 lines
1.7 KiB
SQL
35 lines
1.7 KiB
SQL
-- 0049_suggestion_snoozes.up.sql — time-boxed "not right now" on a Discover
|
|
-- artist suggestion.
|
|
--
|
|
-- This is NOT a dislike. Minstrel has no "Not for me" / thumbs-down /
|
|
-- exclusion control — taste is learned from listening — and a snooze
|
|
-- deliberately isn't one: it records no verdict on
|
|
-- the music, expires on its own, and MUST NEVER feed the taste profile. It is
|
|
-- acquisition triage — "I don't want to request this right now" — so the same
|
|
-- candidate is free to return once snoozed_until passes. Anything that reads
|
|
-- this table as negative preference signal is a bug.
|
|
--
|
|
-- Per-user, never global: one household member parking a
|
|
-- suggestion must not remove it from anyone else's deck.
|
|
--
|
|
-- candidate_mbid is text with NO foreign key, on purpose. Suggestions come
|
|
-- from artist_similarity_unmatched and are out-of-library BY DEFINITION, so
|
|
-- there is no artists row to reference — the MBID is the only stable identity
|
|
-- available. candidate_name is denormalized for the same reason: the manage /
|
|
-- un-snooze list has nowhere else to resolve a display name from.
|
|
|
|
CREATE TABLE suggestion_snoozes (
|
|
user_id uuid NOT NULL REFERENCES users(id) ON DELETE CASCADE,
|
|
candidate_mbid text NOT NULL,
|
|
candidate_name text NOT NULL,
|
|
snoozed_until timestamptz NOT NULL,
|
|
created_at timestamptz NOT NULL DEFAULT now(),
|
|
PRIMARY KEY (user_id, candidate_mbid)
|
|
);
|
|
|
|
-- Supports the gc sweep's unqualified `WHERE snoozed_until < now()` scan. The
|
|
-- composite PK already covers every per-user read, so this is the only extra
|
|
-- index worth its write cost at household-scale row counts (same reasoning as
|
|
-- lidarr_quarantine in 0011).
|
|
CREATE INDEX suggestion_snoozes_expiry_idx ON suggestion_snoozes (snoozed_until);
|