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

This commit is contained in:
a2a-cloud
2026-07-18 08:58:50 +00:00
parent c20b62400e
commit c044d9deab

View File

@@ -1,11 +1,3 @@
CREATE TABLE IF NOT EXISTS app_records ( -- Superseded by 001_csv_answers.sql for the CSVAnswers product schema.
id BIGSERIAL PRIMARY KEY, -- Kept as a no-op scaffold migration so fresh installs converge without unrelated tables.
tenant_key TEXT NOT NULL, SELECT 1;
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);