From dddb9db63c03d57e953ed4cc0ea27d469a9d75b7 Mon Sep 17 00:00:00 2001 From: morpheus65535 Date: Tue, 8 Oct 2019 17:22:37 -0400 Subject: [PATCH 1/3] Fix for #621 --- bazarr/database.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/bazarr/database.py b/bazarr/database.py index 5b1cce45a..dd48e0e88 100644 --- a/bazarr/database.py +++ b/bazarr/database.py @@ -134,7 +134,7 @@ class TableHistory(BaseModel): language = TextField(null=True) provider = TextField(null=True) score = TextField(null=True) - sonarr_episode_id = ForeignKeyField(TableEpisodes, field='sonarr_episode_id', column_name='sonarrEpisodeId', null=False, unique=True) + sonarr_episode_id = ForeignKeyField(TableEpisodes, field='sonarr_episode_id', column_name='sonarrEpisodeId', null=False) sonarr_series_id = ForeignKeyField(TableShows, field='sonarr_series_id', column_name='sonarrSeriesId', null=False) timestamp = IntegerField(null=False) video_path = TextField(null=True) @@ -149,7 +149,7 @@ class TableHistoryMovie(BaseModel): description = TextField(null=False) language = TextField(null=True) provider = TextField(null=True) - radarr_id = ForeignKeyField(TableMovies, field='radarr_id', column_name='radarrId') + radarr_id = ForeignKeyField(TableMovies, field='radarr_id', column_name='radarrId', null=False) score = TextField(null=True) timestamp = IntegerField(null=False) video_path = TextField(null=True) From 18900e46c2e0bd84d35df908759ab61e8fe6a18e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 9 Oct 2019 00:09:52 -0400 Subject: [PATCH 2/3] Version bump. --- bazarr/main.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/bazarr/main.py b/bazarr/main.py index e0c949eb7..1524cf395 100644 --- a/bazarr/main.py +++ b/bazarr/main.py @@ -1,6 +1,6 @@ # coding=utf-8 -bazarr_version = '0.8.2.2' +bazarr_version = '0.8.2.3' import gc import sys From 3827e422f06f5370f88409e2b67095dbcbb2c570 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Louis=20V=C3=A9zina?= <5130500+morpheus65535@users.noreply.github.com> Date: Wed, 9 Oct 2019 06:59:22 -0400 Subject: [PATCH 3/3] Fix for #620. --- bazarr/database.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/bazarr/database.py b/bazarr/database.py index dd48e0e88..94846abd2 100644 --- a/bazarr/database.py +++ b/bazarr/database.py @@ -49,7 +49,7 @@ class TableShows(BaseModel): alternate_titles = TextField(column_name='alternateTitles', null=True) audio_language = TextField(null=True) fanart = TextField(null=True) - forced = TextField(null=True) + forced = TextField(null=True, constraints=[SQL('DEFAULT "False"')]) hearing_impaired = TextField(null=True) languages = TextField(null=True) overview = TextField(null=True) @@ -61,6 +61,10 @@ class TableShows(BaseModel): tvdb_id = IntegerField(column_name='tvdbId', null=True, unique=True, primary_key=True) year = TextField(null=True) + migrate( + migrator.add_column('table_shows', 'forced', forced), + ) + class Meta: table_name = 'table_shows' @@ -98,7 +102,7 @@ class TableMovies(BaseModel): audio_language = TextField(null=True) failed_attempts = TextField(column_name='failedAttempts', null=True) fanart = TextField(null=True) - forced = TextField(null=True) + forced = TextField(null=True, constraints=[SQL('DEFAULT "False"')]) format = TextField(null=True) hearing_impaired = TextField(null=True) imdb_id = TextField(column_name='imdbId', null=True) @@ -120,6 +124,7 @@ class TableMovies(BaseModel): movie_file_id = IntegerField(null=True) migrate( + migrator.add_column('table_movies', 'forced', forced), migrator.add_column('table_movies', 'movie_file_id', movie_file_id), )