a2a-source-edit: write db/migrations/001_app_records.sql

This commit is contained in:
a2a-cloud
2026-07-18 04:43:47 +00:00
parent ee38c2f9c8
commit 81e246746e

View File

@@ -1,3 +1,11 @@
-- Retained migration slot from the full-stack scaffold. CREATE TABLE IF NOT EXISTS app_records (
-- QuoteJudge product tables live in 001_quotejudge.sql. id BIGSERIAL PRIMARY KEY,
SELECT 1; tenant_key TEXT NOT NULL,
record_kind TEXT NOT NULL,
payload JSONB NOT NULL,
created_at TIMESTAMPTZ NOT NULL DEFAULT NOW(),
updated_at TIMESTAMPTZ NOT NULL DEFAULT NOW()
);
CREATE INDEX IF NOT EXISTS app_records_tenant_kind_idx
ON app_records (tenant_key, record_kind, created_at DESC);