Since we are multithreading, we should use a threadsafe type to store the episodes to prevent any threading or race conditions.

This commit is contained in:
tidusjar 2016-08-08 10:52:15 +01:00
commit f112af7e85
2 changed files with 17 additions and 12 deletions

View file

@ -101,6 +101,7 @@ CREATE TABLE IF NOT EXISTS PlexUsers
);
CREATE UNIQUE INDEX IF NOT EXISTS PlexUsers_Id ON PlexUsers (Id);
BEGIN;
CREATE TABLE IF NOT EXISTS PlexEpisodes
(
Id INTEGER PRIMARY KEY AUTOINCREMENT,
@ -112,4 +113,5 @@ CREATE TABLE IF NOT EXISTS PlexEpisodes
EpisodeNumber INTEGER NOT NULL
);
CREATE UNIQUE INDEX IF NOT EXISTS PlexEpisodes_Id ON PlexEpisodes (Id);
CREATE INDEX IF NOT EXISTS PlexEpisodes_ProviderId ON PlexEpisodes (ProviderId);
CREATE INDEX IF NOT EXISTS PlexEpisodes_ProviderId ON PlexEpisodes (ProviderId);
COMMIT;