mirror of
https://github.com/Tautulli/Tautulli.git
synced 2025-07-13 08:42:59 -07:00
Add tag to notify_log database table
This commit is contained in:
parent
2bc25c459f
commit
e0a85e2391
1 changed files with 10 additions and 1 deletions
|
@ -758,7 +758,7 @@ def dbcheck():
|
|||
'CREATE TABLE IF NOT EXISTS notify_log (id INTEGER PRIMARY KEY AUTOINCREMENT, timestamp INTEGER, '
|
||||
'session_key INTEGER, rating_key INTEGER, parent_rating_key INTEGER, grandparent_rating_key INTEGER, '
|
||||
'user_id INTEGER, user TEXT, notifier_id INTEGER, agent_id INTEGER, agent_name TEXT, notify_action TEXT, '
|
||||
'subject_text TEXT, body_text TEXT, script_args TEXT, success INTEGER DEFAULT 0)'
|
||||
'subject_text TEXT, body_text TEXT, script_args TEXT, success INTEGER DEFAULT 0, tag TEXT)'
|
||||
)
|
||||
|
||||
# newsletters table :: This table keeps record of the newsletter settings
|
||||
|
@ -1964,6 +1964,15 @@ def dbcheck():
|
|||
'UPDATE notify_log SET success = 1'
|
||||
)
|
||||
|
||||
# Upgrade notify_log table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT tag FROM notify_log')
|
||||
except sqlite3.OperationalError:
|
||||
logger.debug("Altering database. Updating database table notify_log.")
|
||||
c_db.execute(
|
||||
'ALTER TABLE notify_log ADD COLUMN tag TEXT'
|
||||
)
|
||||
|
||||
# Upgrade newsletter_log table from earlier versions
|
||||
try:
|
||||
c_db.execute('SELECT start_time FROM newsletter_log')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue