-- 0031: brand-template ENTRY names — the browsable source-category names every -- vehicle of (source, brand) shares. Lets a freshly-decoded vehicle show the -- FULL canonical structure (named entries under each bucket) before its own -- deep drill; only part counts/schemas are vehicle-specific. Rebuilt by the -- global canonical-backfill run alongside canonical_structure_template. CREATE TABLE IF NOT EXISTS "canonical_template_entries" ( "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, "source" varchar(20) NOT NULL, "brand" varchar(120) NOT NULL, "canonical_category_id" uuid NOT NULL, "canonical_subcategory_id" uuid, "name" varchar(500) NOT NULL, "vehicle_count" integer DEFAULT 0 NOT NULL, "updated_at" timestamp with time zone DEFAULT now() NOT NULL ); --> statement-breakpoint CREATE INDEX IF NOT EXISTS "canonical_template_entries_sb_idx" ON "canonical_template_entries" ("source","brand");