femto-backend/Femto.Database/Migrations/20250517195800_InitOutboxes.sql
2025-05-17 23:47:32 +02:00

33 lines
986 B
SQL

-- Migration: InitOutboxes
-- Created at: 17/05/2025 19:58:00
CREATE TABLE blog.outbox
(
id uuid PRIMARY KEY,
event_type text NOT NULL,
aggregate_id uuid NOT NULL,
payload text NOT NULL,
created_at timestamp DEFAULT now() NOT NULL,
processed_at timestamp,
next_retry_at timestamp,
retry_count int DEFAULT 0 NOT NULL,
last_error text,
status int DEFAULT 0 NOT NULL
);
CREATE TABLE authn.outbox
(
id uuid PRIMARY KEY,
event_type text NOT NULL,
aggregate_id uuid NOT NULL,
payload text NOT NULL,
created_at timestamp DEFAULT now() NOT NULL,
processed_at timestamp,
next_retry_at timestamp,
retry_count int DEFAULT 0 NOT NULL,
last_error text,
status int DEFAULT 0 NOT NULL
);