diff --git a/bot/modules/topgg/data.py b/bot/modules/topgg/data.py new file mode 100644 index 00000000..829ce6da --- /dev/null +++ b/bot/modules/topgg/data.py @@ -0,0 +1,8 @@ +from data import RowTable, Table + +topggvotes = RowTable( + 'topgg', + ('voteid', 'userid', 'boostedTimestamp'), + 'voteid' +) + diff --git a/data/schema.sql b/data/schema.sql index 51432086..c5dfca6f 100644 --- a/data/schema.sql +++ b/data/schema.sql @@ -144,6 +144,15 @@ CREATE TABLE tasklist( ); CREATE INDEX tasklist_users ON tasklist (userid); +-- Topgg Data {{{ +create TABLE topgg( + voteid SERIAL PRIMARY KEY, + userid BIGINT NOT NULL, + boostedTimestamp TIMESTAMPTZ NOT NULL +); +CREATE INDEX topgg_member ON topgg (guildid, userid); +-- }}} + CREATE TABLE tasklist_channels( guildid BIGINT NOT NULL, channelid BIGINT NOT NULL