Files
xinghuoapi/backend/migrations/036_scheduler_outbox.sql
huangzhenpc f52498603c
Some checks failed
CI / test (push) Has been cancelled
CI / golangci-lint (push) Has been cancelled
Security Scan / backend-security (push) Has been cancelled
Security Scan / frontend-security (push) Has been cancelled
first commit
2026-01-15 20:29:55 +08:00

11 lines
331 B
SQL

CREATE TABLE IF NOT EXISTS scheduler_outbox (
id BIGSERIAL PRIMARY KEY,
event_type TEXT NOT NULL,
account_id BIGINT NULL,
group_id BIGINT NULL,
payload JSONB NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS idx_scheduler_outbox_created_at ON scheduler_outbox (created_at);