mirror of
https://github.com/JuLi0n21/pwa-player.git
synced 2026-04-19 23:40:05 +00:00
add sqlc, fix background img fetching
This commit is contained in:
36
grpc-backend/sqlc/schema/schema.sql
Normal file
36
grpc-backend/sqlc/schema/schema.sql
Normal file
@@ -0,0 +1,36 @@
|
||||
-- Beatmap Table
|
||||
CREATE TABLE IF NOT EXISTS Beatmap (
|
||||
BeatmapId INTEGER DEFAULT 0,
|
||||
Artist TEXT DEFAULT '?????',
|
||||
ArtistUnicode TEXT DEFAULT '?????',
|
||||
Title TEXT DEFAULT '???????',
|
||||
TitleUnicode TEXT DEFAULT '???????',
|
||||
Creator TEXT DEFAULT '?????',
|
||||
Difficulty TEXT DEFAULT '1',
|
||||
Audio TEXT DEFAULT 'unknown.mp3',
|
||||
MD5Hash TEXT DEFAULT '00000000000000000000000000000000',
|
||||
File TEXT DEFAULT 'unknown.osu',
|
||||
RankedStatus TEXT DEFAULT 'Unknown',
|
||||
LastModifiedTime DATETIME DEFAULT '0001-01-01 00:00:00',
|
||||
TotalTime INTEGER DEFAULT 0,
|
||||
AudioPreviewTime INTEGER DEFAULT 0,
|
||||
BeatmapSetId INTEGER DEFAULT -1,
|
||||
Source TEXT DEFAULT '',
|
||||
Tags TEXT DEFAULT '',
|
||||
LastPlayed DATETIME DEFAULT '0001-01-01 00:00:00',
|
||||
Folder TEXT DEFAULT 'Unknown Folder',
|
||||
UNIQUE (Artist, Title, MD5Hash, Difficulty)
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_beatmap_md5hash ON Beatmap(MD5Hash);
|
||||
CREATE INDEX IF NOT EXISTS idx_beatmap_lastModifiedTime ON Beatmap(LastModifiedTime);
|
||||
CREATE INDEX IF NOT EXISTS idx_beatmap_title_artist ON Beatmap(Title, Artist);
|
||||
|
||||
-- Collection Table
|
||||
CREATE TABLE IF NOT EXISTS Collection (
|
||||
Name TEXT DEFAULT '',
|
||||
MD5Hash TEXT DEFAULT '00000000000000000000000000000000'
|
||||
);
|
||||
|
||||
CREATE INDEX IF NOT EXISTS idx_collection_name ON Collection(Name);
|
||||
CREATE INDEX IF NOT EXISTS idx_collection_md5hash ON Collection(MD5Hash);
|
||||
Reference in New Issue
Block a user