Transactional Outbox パターン用の補償タスクテーブル
| Name | Type | Default | Nullable | Children | Parents | Comment |
|---|---|---|---|---|---|---|
| id | bigint | nextval('outbox_tasks_id_seq'::regclass) | false | タスクID(自動採番) | ||
| compensation_id | bigint | false | public.compensations | 補償ID(compensations への外部キー) | ||
| order_id | varchar(64) | false | 注文ID | |||
| task_type | varchar(50) | false | タスク種別 | |||
| payload | text | false | タスクペイロード(JSON) | |||
| published | boolean | false | false | 実行済みフラグ | ||
| created_at | timestamp with time zone | now() | false | 作成日時 | ||
| published_at | timestamp with time zone | true | 実行日時 |
| Name | Type | Definition |
|---|---|---|
| outbox_tasks_compensation_id_fkey | FOREIGN KEY | FOREIGN KEY (compensation_id) REFERENCES compensations(comp_id) |
| outbox_tasks_pkey | PRIMARY KEY | PRIMARY KEY (id) |
| Name | Definition |
|---|---|
| outbox_tasks_pkey | CREATE UNIQUE INDEX outbox_tasks_pkey ON public.outbox_tasks USING btree (id) |
| idx_outbox_tasks_unpublished | CREATE INDEX idx_outbox_tasks_unpublished ON public.outbox_tasks USING btree (published, created_at) WHERE (published = false) |
Generated by tbls