As part of the migration from WebSQL to IndexedDb, we opted for minimal changes to the storage formats to reduce the impact on other parts of the code base (outside of the storage layer).
At some point we should revisit this and update where it makes sense to do so, for example:
Change the ModelType aliases from proper case to lower case
Create a base PersistedModel interface that other models extend
Remove PersistedProgram.ProgramID, PersistedSeries.SeriesID and PersistedEpisode.EpisodeID primary keys in favour of the common PersistedModel.id field
Remove PersistedProgram.ProgramName, PersistedSeries.SeriesName and PersistedEpisode.EpisodeName fields in favour of the common PersistedModel.name field
As part of the migration from WebSQL to IndexedDb, we opted for minimal changes to the storage formats to reduce the impact on other parts of the code base (outside of the storage layer).
At some point we should revisit this and update where it makes sense to do so, for example:
ModelType
aliases from proper case to lower casePersistedModel
interface that other models extendPersistedProgram.ProgramID
,PersistedSeries.SeriesID
andPersistedEpisode.EpisodeID
primary keys in favour of the commonPersistedModel.id
fieldPersistedProgram.ProgramName
,PersistedSeries.SeriesName
andPersistedEpisode.EpisodeName
fields in favour of the commonPersistedModel.name
fieldStrawman