Add body text to newsletters

This commit is contained in:
JonnyWong16 2018-03-19 20:20:57 -07:00
commit 7e11af1fd0
8 changed files with 170 additions and 76 deletions

View file

@ -638,14 +638,15 @@ def dbcheck():
'CREATE TABLE IF NOT EXISTS newsletters (id INTEGER PRIMARY KEY AUTOINCREMENT, '
'agent_id INTEGER, agent_name TEXT, agent_label TEXT, '
'friendly_name TEXT, newsletter_config TEXT, email_config TEXT, '
'cron TEXT NOT NULL DEFAULT "0 0 * * 0", active INTEGER DEFAULT 0)'
'subject TEXT, body TEXT, cron TEXT NOT NULL DEFAULT "0 0 * * 0", active INTEGER DEFAULT 0)'
)
# newsletter_log table :: This is a table which logs newsletters sent
c_db.execute(
'CREATE TABLE IF NOT EXISTS newsletter_log (id INTEGER PRIMARY KEY AUTOINCREMENT, timestamp INTEGER, '
'newsletter_id INTEGER, agent_id INTEGER, agent_name TEXT, notify_action TEXT, '
'subject_text TEXT, start_date TEXT, end_date TEXT, uuid TEXT UNIQUE, success INTEGER DEFAULT 0)'
'subject_text TEXT, body_text TEXT, start_date TEXT, end_date TEXT, '
'uuid TEXT UNIQUE, success INTEGER DEFAULT 0)'
)
# poster_urls table :: This table keeps record of the notification poster urls