feat(server): the review log, synced and append-only
ReviewLog keeps every rating of a card: the card, the rating (FSRS's 1 again to 4 easy), when (UTC) and how long answering took, as decided. It is never changed; each device derives a card's schedule by replaying its reviews, so reviews from different devices never conflict. No device id: the sync engine knows each row's device. The migration (by CLI) only adds: the table, an index on spaceId for space deletion, one for a card's reviews in time order, and the foreign keys (from the space with ON DELETE CASCADE; from the card with ON DELETE CASCADE, DEFERRABLE INITIALLY DEFERRED). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Signed-off-by: Tizian 「ティツィアーン」 <raisondetredev@pm.me>
This commit is contained in:
parent
38843dbff2
commit
5334a0baa5
1 changed files with 15133 additions and 0 deletions
|
|
@ -6,6 +6,7 @@ import 'package:serverpod_database/serverpod_database.dart';
|
|||
|
||||
part '20260930094729362-studysets/migration.dart';
|
||||
part '20260930122235111-cards/migration.dart';
|
||||
part '20260930145136285-reviews/migration.dart';
|
||||
|
||||
/// Migration registry for the client-side database.
|
||||
class MigrationRegistry {
|
||||
|
|
@ -14,6 +15,7 @@ class MigrationRegistry {
|
|||
static final List<MigrationVersionSql> migrations = [
|
||||
_Migration20260930094729362_studysets(),
|
||||
_Migration20260930122235111_cards(),
|
||||
_Migration20260930145136285_reviews(),
|
||||
];
|
||||
|
||||
/// List of all client-side database migration versions.
|
||||
|
|
|
|||
Loading…
Reference in a new issue