[DB] Init Topgg DB Framework
This commit is contained in:
8
bot/modules/topgg/data.py
Normal file
8
bot/modules/topgg/data.py
Normal file
@@ -0,0 +1,8 @@
|
|||||||
|
from data import RowTable, Table
|
||||||
|
|
||||||
|
topggvotes = RowTable(
|
||||||
|
'topgg',
|
||||||
|
('voteid', 'userid', 'boostedTimestamp'),
|
||||||
|
'voteid'
|
||||||
|
)
|
||||||
|
|
||||||
@@ -144,6 +144,15 @@ CREATE TABLE tasklist(
|
|||||||
);
|
);
|
||||||
CREATE INDEX tasklist_users ON tasklist (userid);
|
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(
|
CREATE TABLE tasklist_channels(
|
||||||
guildid BIGINT NOT NULL,
|
guildid BIGINT NOT NULL,
|
||||||
channelid BIGINT NOT NULL
|
channelid BIGINT NOT NULL
|
||||||
|
|||||||
Reference in New Issue
Block a user