CREATE TABLE email_requests (
    id BIGSERIAL PRIMARY KEY,
    recipient VARCHAR(255) NOT NULL,
    subject VARCHAR(255) NOT NULL,
    body TEXT,
    sent_at TIMESTAMP,
    status VARCHAR(50) NOT NULL,
    error_message TEXT,
    created_at TIMESTAMP NOT NULL
);

CREATE INDEX idx_email_requests_status ON email_requests(status);
CREATE INDEX idx_email_requests_created_at ON email_requests(created_at);
