Add verify_ack column to bulk_address_uploads (0219)

The "Verify classification" acknowledgement flag for ADR-0004 Step 1.
Gates Finalise whenever an upload has classifier columns, independent of
multi-entry, so it lives in its own column rather than on
multiEntryOrdering.

Plain additive column (boolean NOT NULL DEFAULT false), no data backfill,
so it applies cleanly with either `drizzle-kit migrate` or `push`. The
feature that reads/writes it lands separately on
feature/frontend_landlord_overrides.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
This commit is contained in:
Jun-te Kim 2026-06-02 17:54:01 +00:00
parent a5947d11b9
commit ca4946f594
4 changed files with 10165 additions and 1 deletions

View file

@ -0,0 +1 @@
ALTER TABLE "bulk_address_uploads" ADD COLUMN "verify_ack" boolean DEFAULT false NOT NULL;

File diff suppressed because it is too large Load diff

View file

@ -1534,6 +1534,13 @@
"when": 1780408378351,
"tag": "0218_natural_umar",
"breakpoints": true
},
{
"idx": 219,
"version": "7",
"when": 1780419959831,
"tag": "0219_add_verify_ack",
"breakpoints": true
}
]
}

View file

@ -1,4 +1,4 @@
import { pgTable, uuid, text, timestamp, jsonb } from "drizzle-orm/pg-core";
import { pgTable, uuid, text, timestamp, jsonb, boolean } from "drizzle-orm/pg-core";
import { sql } from "drizzle-orm";
// Shape of the multi_entry_summary jsonb (ADR-0004). Co-located with the column
@ -51,6 +51,12 @@ export const bulkAddressUploads = pgTable("bulk_address_uploads", {
multiEntrySummary: jsonb("multi_entry_summary").$type<MultiEntrySummary>(),
// User-confirmed building-part ordering for the multi-entry sample (ADR-0004).
multiEntryOrdering: jsonb("multi_entry_ordering").$type<MultiEntryOrdering>(),
// Step 1 "Verify classification" acknowledgement (ADR-0004). Gates Finalise
// whenever the upload has classifier columns — independent of multi-entry, so
// it lives in its own column rather than on multiEntryOrdering. Set true by
// the verify-classification route once the user confirms the sample's
// description→enum mapping.
verifyAck: boolean("verify_ack").notNull().default(false),
taskId: uuid("task_id"),
combinedOutputS3Uri: text("combined_output_s3_uri"),
createdAt: timestamp("created_at", { withTimezone: true }).notNull().defaultNow(),