Skip to content

Commit

Permalink
Update current sanity check and column default
Browse files Browse the repository at this point in the history
  • Loading branch information
sharkykh committed Sep 7, 2018
1 parent b96c2c7 commit 6779024
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions medusa/databases/main_db.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,8 +223,8 @@ def fix_show_nfo_lang(self):
self.connection.action("UPDATE tv_shows SET lang = '' WHERE lang = 0 OR lang = '0';")

def fix_tv_episodes_watched_field(self):
"""A mistake was made when we added this field. Migration didn't went very well."""
self.connection.action("UPDATE tv_episodes SET watched = 0 WHERE watched is null;")
"""A mistake was made when we added this field. Migration didn't go very well."""
self.connection.action('UPDATE tv_episodes SET watched = 0 WHERE watched IS NULL;')


# ======================
Expand Down Expand Up @@ -869,7 +869,7 @@ def execute(self):
'subtitles TEXT, subtitles_searchcount NUMERIC, subtitles_lastsearch TIMESTAMP, '
'is_proper NUMERIC, scene_season NUMERIC, scene_episode NUMERIC, absolute_number NUMERIC, '
'scene_absolute_number NUMERIC, version NUMERIC DEFAULT -1, release_group TEXT, '
'manually_searched NUMERIC, watched NUMERIC);'
'manually_searched NUMERIC, watched NUMERIC DEFAULT 0);'
)

# Re-insert old values, setting the new column 'watched' to the default value 0.
Expand Down

0 comments on commit 6779024

Please sign in to comment.