changed DB schema *again* ugh

This commit is contained in:
Lynne Megido 2018-11-12 23:39:52 +10:00
parent 0e5604af47
commit 0279b09690
Signed by: lynnesbian
GPG key ID: FB7B970303ACE499

3
web.py
View file

@ -36,10 +36,11 @@ dc = db.cursor(dictionary=True)
# | cc | tinytext | YES | | NULL | | # | cc | tinytext | YES | | NULL | |
# | ccavi | varchar(128) | YES | | https://lynnesbian.space/res/ceres/cc-smol.png | | # | ccavi | varchar(128) | YES | | https://lynnesbian.space/res/ceres/cc-smol.png | |
# | latest_post | tinytext | YES | | NULL | | # | latest_post | tinytext | YES | | NULL | |
# | last_check | tinytext | YES | | NULL | |
# | time_between_checks | int(11) | YES | | NULL | | # | time_between_checks | int(11) | YES | | NULL | |
# | settings | longtext | YES | | NULL | | # | settings | longtext | YES | | NULL | |
# +---------------------+--------------+------+-----+------------------------------------------------+-------+ # +---------------------+--------------+------+-----+------------------------------------------------+-------+
c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, time_between_checks INT, settings LONGTEXT, PRIMARY KEY(username, instance))") c.execute("CREATE TABLE IF NOT EXISTS `data` (username VARCHAR(64) NOT NULL, instance VARCHAR(128) NOT NULL, password TINYTEXT NOT NULL, avi TEXT NOT NULL, secret TINYTEXT NOT NULL, client_id VARCHAR(128) NOT NULL, client_secret TINYTEXT NOT NULL, cc TINYTEXT, ccavi VARCHAR(128) DEFAULT 'https://lynnesbian.space/res/ceres/cc-smol.png', latest_post TINYTEXT, last_check TINYTEXT, time_between_checks INT, settings LONGTEXT, PRIMARY KEY(username, instance))")
app = Flask(cfg['name']) app = Flask(cfg['name'])
app.secret_key = cfg['flask_key'] app.secret_key = cfg['flask_key']