2 Commits

Author SHA1 Message Date
Robert Paciorek
20af614d0d user data export and import interfce (WIP) 2025-07-28 09:43:49 +00:00
Hipposgrumm
24695583b3
Rating for Pods, Games, and (probably) other stuff (#16)
Implements the rating system.

Shipwreck Lagoon tracks theoretically work, but there's currently no way of testing them.
There is a hack to make the ranked pods section of the blaster party board work. Don't know if that'll cause any issues (but I don't think so).

SQLite database schema changes:

```sql
CREATE TABLE "RatingRanks" (
	"Id"	INTEGER NOT NULL,
	"CategoryID"	INTEGER NOT NULL,
	"RatedEntityID"	INTEGER,
	"RatedUserID"	TEXT,
	"Rank"	INTEGER NOT NULL,
	"RatingAverage"	REAL NOT NULL,
	"UpdateDate"	TEXT NOT NULL,
	CONSTRAINT "PK_RatingRanks" PRIMARY KEY("Id" AUTOINCREMENT)
);
CREATE TABLE "Ratings" (
	"Id"	INTEGER NOT NULL,
	"VikingId"	INTEGER NOT NULL,
	"RankId"	INTEGER NOT NULL,
	"Value"	INTEGER NOT NULL,
	"Date"	TEXT NOT NULL,
	CONSTRAINT "FK_Ratings_RatingRanks_RankId" FOREIGN KEY("RankId") REFERENCES "RatingRanks"("Id") ON DELETE CASCADE,
	CONSTRAINT "PK_Ratings" PRIMARY KEY("Id" AUTOINCREMENT),
	CONSTRAINT "FK_Ratings_Vikings_VikingId" FOREIGN KEY("VikingId") REFERENCES "Vikings"("Id") ON DELETE CASCADE
);
```

---------

Co-authored-by: Robert Paciorek <robert@opcode.eu.org>
2025-02-08 10:19:43 +01:00