mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-08-14 02:26:58 -07:00
Store websocket rating key to compare against when mismatched with sessions XML (Fixes Tautulli/Tautulli-Issues#174)
This commit is contained in:
parent
9b42bb240a
commit
eae842b09a
3 changed files with 15 additions and 1 deletions
|
@ -1156,6 +1156,15 @@ def dbcheck():
|
|||
'ALTER TABLE sessions ADD COLUMN relayed INTEGER'
|
||||
)
|
||||
|
||||
# Upgrade sessions table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT rating_key_websocket FROM sessions')
|
||||
except sqlite3.OperationalError:
|
||||
logger.debug(u"Altering database. Updating database table sessions.")
|
||||
c_db.execute(
|
||||
'ALTER TABLE sessions ADD COLUMN rating_key_websocket TEXT'
|
||||
)
|
||||
|
||||
# Upgrade session_history table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT reference_id FROM session_history')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue