OCT 1. IPTV 数据库增加是否上报服务器字段

This commit is contained in:
黄昕 2023-05-18 09:13:20 +08:00
parent b618761330
commit e02c12f582
1 changed files with 67 additions and 66 deletions

View File

@ -56,11 +56,12 @@
" ( id INTEGER PRIMARY KEY AUTOINCREMENT," \
" uid INTEGER NOT NULL," \
" mac CHAR(20) NOT NULL," \
" report INTEGER NOT NULL," \
" createTm TIMESTAMP DEFAULT (datetime('now', 'localtime')) NOT NULL" \
"); CREATE INDEX IF NOT EXISTS iptv_index ON iptv(uid);"
#define INSERT_IPTV_DEVICE \
"INSERT INTO iptv (uid, mac) SELECT %d, '%s' WHERE NOT EXISTS (SELECT id FROM iptv WHERE uid = %d AND mac = " \
"INSERT INTO iptv (uid, mac, report) SELECT %d, '%s', 0 WHERE NOT EXISTS (SELECT id FROM iptv WHERE uid = %d AND mac = " \
"'%s');"
#define INSERT_PRE_ASSIGN_ROW_FMT \