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

This commit is contained in:
a2a-cloud
2026-07-18 06:48:02 +00:00
parent f082bd1ae5
commit 83c4e7bc97

View File

@@ -1,11 +1,5 @@
CREATE TABLE IF NOT EXISTS app_records ( -- QuoteJudge Studio v0.1.0 managed Postgres baseline.
id BIGSERIAL PRIMARY KEY, -- The product tables are created by 001_quote_judge.sql. This scaffold
tenant_key TEXT NOT NULL, -- placeholder is intentionally inert so fresh installs converge without
record_kind TEXT NOT NULL, -- retaining the generic app_records table from the full-stack template.
payload JSONB NOT NULL, SELECT 1;
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);