A website inspired by Last.fm that will keep track of your listening statistics
lastfm music statistics
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

Update naming for `user_follows` table. Add migrations for liking and following items from the musicbrainz catalog.

oscar345 61d9ac20 a40687c9

+57 -20
-20
private/migrations/app/20260112144128_create_followers.sql
··· 1 - -- +goose Up 2 - -- +goose StatementBegin 3 - CREATE TABLE followers ( 4 - user_id INTEGER NOT NULL, 5 - follower_id INTEGER NOT NULL, 6 - created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, 7 - updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 - PRIMARY KEY (user_id, follower_id), 9 - FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, 10 - FOREIGN KEY (follower_id) REFERENCES users(id) ON DELETE CASCADE, 11 - ); 12 - 13 - CREATE INDEX idx__followers__follower_id ON followers(follower_id); 14 - CREATE INDEX idx__followers__user_id ON followers(user_id); 15 - -- +goose StatementEnd 16 - 17 - -- +goose Down 18 - -- +goose StatementBegin 19 - DROP TABLE followers; 20 - -- +goose StatementEnd
+20
private/migrations/app/20260112144128_create_user_follows.sql
··· 1 + -- +goose Up 2 + -- +goose StatementBegin 3 + CREATE TABLE user_follows ( 4 + user_id INTEGER NOT NULL, 5 + target_id INTEGER NOT NULL, 6 + created_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, 7 + updated_at TEXT NOT NULL DEFAULT CURRENT_TIMESTAMP, 8 + PRIMARY KEY (user_id, target_id), 9 + FOREIGN KEY (user_id) REFERENCES users(id) ON DELETE CASCADE, 10 + FOREIGN KEY (target_id) REFERENCES users(id) ON DELETE CASCADE, 11 + ); 12 + 13 + CREATE INDEX idx__user_follows__target_id ON followers(target_id); 14 + CREATE INDEX idx__user_follows__user_id ON followers(user_id); 15 + -- +goose StatementEnd 16 + 17 + -- +goose Down 18 + -- +goose StatementBegin 19 + DROP TABLE followers; 20 + -- +goose StatementEnd
+19
private/migrations/app/20260113080115_create_artist_followers.sql
··· 1 + -- +goose Up 2 + -- +goose StatementBegin 3 + CREATE TABLE artist_followers ( 4 + artist_id INTEGER NOT NULL, 5 + user_id INTEGER NOT NULL, 6 + created_at TIMESTAMP NOT NULL DEFAULT CURRENT_TIMESTAMP, 7 + PRIMARY KEY (artist_id, user_id), 8 + FOREIGN KEY (artist_id) REFERENCES artists(id), 9 + FOREIGN KEY (user_id) REFERENCES users(id) 10 + ); 11 + 12 + CREATE INDEX idx__artist_followers__artist_id ON artist_followers (artist_id); 13 + CREATE INDEX idx__artist_followers__user_id ON artist_followers (user_id); 14 + -- +goose StatementEnd 15 + 16 + -- +goose Down 17 + -- +goose StatementBegin 18 + DROP TABLE artist_followers; 19 + -- +goose StatementEnd
+9
private/migrations/app/20260113080132_create_release_group_likes.sql
··· 1 + -- +goose Up 2 + -- +goose StatementBegin 3 + SELECT 'up SQL query'; 4 + -- +goose StatementEnd 5 + 6 + -- +goose Down 7 + -- +goose StatementBegin 8 + SELECT 'down SQL query'; 9 + -- +goose StatementEnd
+9
private/migrations/app/20260113080142_create_recording_likes.sql
··· 1 + -- +goose Up 2 + -- +goose StatementBegin 3 + SELECT 'up SQL query'; 4 + -- +goose StatementEnd 5 + 6 + -- +goose Down 7 + -- +goose StatementBegin 8 + SELECT 'down SQL query'; 9 + -- +goose StatementEnd