This commit is contained in:
@@ -7,6 +7,7 @@ import {
|
||||
Profile,
|
||||
SyncState,
|
||||
} from "../types";
|
||||
import { ImportedGame } from "../types/gameImport";
|
||||
import { generateId } from "../utils/id";
|
||||
|
||||
// When the sync engine applies records pulled/acked from the server, it flips
|
||||
@@ -25,6 +26,7 @@ export class BoardScoreDatabase extends Dexie {
|
||||
locations!: Table<Location, string>;
|
||||
profiles!: Table<Profile, string>;
|
||||
syncState!: Table<SyncState, string>;
|
||||
importedGames!: Table<ImportedGame, [string, string]>;
|
||||
|
||||
constructor() {
|
||||
super("BoardScoreDatabase");
|
||||
@@ -141,6 +143,18 @@ export class BoardScoreDatabase extends Dexie {
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// Version 6: imported game definitions (per profile)
|
||||
this.version(6).stores({
|
||||
sessions:
|
||||
"id, gameId, dateStart, status, locationId, updatedAt, profileId, dirty",
|
||||
settings: "id",
|
||||
players: "id, name, createdAt, updatedAt, profileId, dirty",
|
||||
locations: "id, name, createdAt, updatedAt, profileId, dirty",
|
||||
profiles: "id, name, createdAt, updatedAt",
|
||||
syncState: "profileId",
|
||||
importedGames: "[profileId+id], profileId, id, name",
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user