-
Notifications
You must be signed in to change notification settings - Fork 277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix watched null values. #5132
Fix watched null values. #5132
Conversation
medusa/databases/main_db.py
Outdated
@@ -221,6 +222,10 @@ def fix_subtitles_codes(self): | |||
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.""" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might want to swap "went" with "go".
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thinking out loud, should we add a new migration?
@p0psicles |
For new users yes. Users that are allready on db 4.12 not. |
@p0psicles Lines 1113 to 1114 in 6779024
|
I don't know why I didn't think of this before. I think the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm basically approving my own code so it can be merged
Please check my last comment.
I also cant merge it |
Yeah the bool does the trick |
* Fix watched null values. * Update main_db.py oops * Update main_db.py * Update current sanity check and column default * Revert all previous commits Revert "Update current sanity check and column default" This reverts commit 6779024. Revert "Update main_db.py" This reverts commit a1c8e7a. Revert "Update main_db.py" This reverts commit a08759a. Revert "Fix watched null values." This reverts commit 848c527. * Use `try_int` when loading from database * `Episode.watched` should be boolean * Update changelog # Conflicts: # CHANGELOG.md # medusa/tv/episode.py
@sharkykh still not sure if this PR is needed at all. But throwing it out here, just in case.