-- Fetch all the Messages belonging to the Discord
-- account of a particular user.
SELECT *
FROM fiber.discord_message
WHERE account_id = '{user.discord_id}'
-- Fetch all the Messages belonging to the Discord
-- account of a particular user.
SELECT *
FROM fiber.discord_message
WHERE account_id = '{user.discord_id}'
Code
CREATE TABLE fiber.discord_message (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
reactions JSONB,
attachments JSONB,
tts BOOLEAN,
embeds JSONB,
timestamp TIMESTAMP WITH TIME ZONE,
mention_everyone BOOLEAN,
id TEXT,
pinned BOOLEAN,
edited_timestamp TIMESTAMP WITH TIME ZONE,
author JSONB,
mention_roles TEXT[],
content TEXT,
channel_id TEXT,
mentions JSONB,
type DOUBLE PRECISION
)
CREATE TABLE fiber.discord_message (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
reactions JSONB,
attachments JSONB,
tts BOOLEAN,
embeds JSONB,
timestamp TIMESTAMP WITH TIME ZONE,
mention_everyone BOOLEAN,
id TEXT,
pinned BOOLEAN,
edited_timestamp TIMESTAMP WITH TIME ZONE,
author JSONB,
mention_roles TEXT[],
content TEXT,
channel_id TEXT,
mentions JSONB,
type DOUBLE PRECISION
)
Model definition