a2a-source-edit: write db/migrations/001_app_records.sql
This commit is contained in:
@@ -1,11 +1,2 @@
|
|||||||
CREATE TABLE IF NOT EXISTS app_records (
|
-- Replaced by 001_quotejudge_schema.sql. Kept as a no-op so prior scaffold
|
||||||
id BIGSERIAL PRIMARY KEY,
|
-- migration names remain harmless and idempotent across repair iterations.
|
||||||
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);
|
|
||||||
|
|||||||
Reference in New Issue
Block a user