ci / ts / ts (packages + web) (push) Canceled after 1m0s
ci / api / api (push) Successful in 46s
ci / contract / contract (сгенерированный код совпадает с openapi.yaml) (push) Successful in 56s
ci / db / db (push) Successful in 1m32s
ci / mobile / mobile (Metro-бандл Android) (push) Successful in 1m27s
ci / docker / docker (образы собираются — их сервер собирает сам при обновлении) (push) Successful in 1m31s
Search hits omit album covers and artist images. The worker now reads the full song and artist, stores the description, and leaves Genius image URLs unchanged on mobile. Co-authored-by: Cursor <cursoragent@cursor.com>
27 lines
1.1 KiB
SQL
27 lines
1.1 KiB
SQL
-- +goose Up
|
|
CREATE TABLE genius_state (
|
|
id boolean PRIMARY KEY DEFAULT true CHECK (id),
|
|
paused boolean NOT NULL DEFAULT false,
|
|
last_error text NOT NULL DEFAULT '',
|
|
cooldown_until timestamptz NOT NULL DEFAULT '1970-01-01'
|
|
);
|
|
INSERT INTO genius_state (id) VALUES (true);
|
|
CREATE TABLE genius_tracks (
|
|
track_id uuid PRIMARY KEY REFERENCES tracks(id) ON DELETE CASCADE,
|
|
status text NOT NULL DEFAULT 'pending' CHECK (status IN ('pending','processing','ready','partial','unmatched','error')),
|
|
content jsonb NOT NULL DEFAULT '{}',
|
|
attempts integer NOT NULL DEFAULT 0,
|
|
last_error text NOT NULL DEFAULT '',
|
|
next_attempt timestamptz NOT NULL DEFAULT now(),
|
|
locked_until timestamptz NOT NULL DEFAULT '1970-01-01',
|
|
updated_at timestamptz NOT NULL DEFAULT now()
|
|
);
|
|
CREATE INDEX genius_queue_idx ON genius_tracks (next_attempt) WHERE status IN ('pending','processing','error','partial');
|
|
ALTER TABLE artists ADD COLUMN genius_image_url text;
|
|
ALTER TABLE albums ADD COLUMN genius_cover_url text;
|
|
-- +goose Down
|
|
ALTER TABLE albums DROP COLUMN genius_cover_url;
|
|
ALTER TABLE artists DROP COLUMN genius_image_url;
|
|
DROP TABLE genius_tracks;
|
|
DROP TABLE genius_state;
|