mirror of
https://github.com/navidrome/navidrome.git
synced 2025-12-23 23:18:05 -05:00
* feat(scrobble): implement scrobble repository and record scrobble history Signed-off-by: Deluan <deluan@navidrome.org> * feat(scrobble): add configuration option to enable scrobble history Signed-off-by: Deluan <deluan@navidrome.org> * test(scrobble): enhance scrobble history tests for repository recording Signed-off-by: Deluan <deluan@navidrome.org> --------- Signed-off-by: Deluan <deluan@navidrome.org>
21 lines
530 B
SQL
21 lines
530 B
SQL
-- +goose Up
|
|
-- +goose StatementBegin
|
|
CREATE TABLE scrobbles(
|
|
media_file_id VARCHAR(255) NOT NULL
|
|
REFERENCES media_file(id)
|
|
ON DELETE CASCADE
|
|
ON UPDATE CASCADE,
|
|
user_id VARCHAR(255) NOT NULL
|
|
REFERENCES user(id)
|
|
ON DELETE CASCADE
|
|
ON UPDATE CASCADE,
|
|
submission_time INTEGER NOT NULL
|
|
);
|
|
CREATE INDEX scrobbles_date ON scrobbles (submission_time);
|
|
-- +goose StatementEnd
|
|
|
|
-- +goose Down
|
|
-- +goose StatementBegin
|
|
DROP TABLE scrobbles;
|
|
-- +goose StatementEnd
|