mirror of
https://git.coastit.co.za/caitlin/CRM_ENVR.git
synced 2026-07-10 11:15:43 +02:00
13 lines
428 B
SQL
13 lines
428 B
SQL
CREATE TABLE IF NOT EXISTS sent_emails (
|
|
id UUID PRIMARY KEY DEFAULT uuid_generate_v4(),
|
|
recipient VARCHAR(255) NOT NULL,
|
|
subject VARCHAR(255) NOT NULL,
|
|
body_html TEXT,
|
|
body_text TEXT,
|
|
event_id UUID,
|
|
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
|
|
);
|
|
|
|
CREATE INDEX IF NOT EXISTS idx_sent_emails_recipient ON sent_emails(recipient);
|
|
CREATE INDEX IF NOT EXISTS idx_sent_emails_created ON sent_emails(created_at DESC);
|