Store role list in database and convert role mentions into a readable format
This commit is contained in:
19
database/upgrades/07-store-role-info.sql
Normal file
19
database/upgrades/07-store-role-info.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- v7: Store role info
|
||||
CREATE TABLE role (
|
||||
dc_guild_id TEXT,
|
||||
dcid TEXT,
|
||||
|
||||
name TEXT NOT NULL,
|
||||
icon TEXT,
|
||||
|
||||
mentionable BOOLEAN NOT NULL,
|
||||
managed BOOLEAN NOT NULL,
|
||||
hoist BOOLEAN NOT NULL,
|
||||
|
||||
color INTEGER NOT NULL,
|
||||
position INTEGER NOT NULL,
|
||||
permissions BIGINT NOT NULL,
|
||||
|
||||
PRIMARY KEY (dc_guild_id, dcid),
|
||||
CONSTRAINT role_guild_fkey FOREIGN KEY (dc_guild_id) REFERENCES guild (dcid) ON DELETE CASCADE
|
||||
);
|
||||
Reference in New Issue
Block a user