-- Fetch all the Messages belonging to the Slack
-- account of a particular user.
SELECT *
FROM fiber.slack_message
WHERE account_id = '{user.slack_id}'
-- Fetch all the Messages belonging to the Slack
-- account of a particular user.
SELECT *
FROM fiber.slack_message
WHERE account_id = '{user.slack_id}'
Code
CREATE TABLE fiber.slack_message (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
type TEXT,
user TEXT,
text TEXT,
attachment JSONB,
ts TEXT
)
CREATE TABLE fiber.slack_message (
id TEXT NOT NULL,
created_at TIMESTAMP WITH TIME ZONE,
updated_at TIMESTAMP WITH TIME ZONE,
account_id TEXT,
type TEXT,
user TEXT,
text TEXT,
attachment JSONB,
ts TEXT
)
Model definition