Skip to main content

SENT_MAILS_MIGRATION

Constant SENT_MAILS_MIGRATION 

Source
pub const SENT_MAILS_MIGRATION: &str = "-- Mail (ADR-0020): written by puerto. One row per mail a worker consumer sent for an event, so a\n-- redelivered event does not send it again. Growing by one row per mail: pruning old rows is yours.\n\nCREATE TABLE sent_mails (\n    event_id UUID        NOT NULL,\n    mail     TEXT        NOT NULL,\n    sent_at  TIMESTAMPTZ NOT NULL DEFAULT now(),\n    PRIMARY KEY (event_id, mail)\n);\n";
Expand description

The sent-mail log (migrations/sent_mails.sql). Puerto’s CLI ships a byte-for-byte copy of it as a project migration.