← back to Nationalrealestate

db/migrations/021_firm_street_address.sql

10 lines

-- TK-10669: firm street address for a full DRE-style contact card.
-- The DRE registry ships name + license + mailing CITY only (no street, no phone).
-- Google Places returns formattedAddress in the SAME searchText call that yields
-- website + phone, so we capture the street address at $0 extra on confident matches.
-- No BEGIN/COMMIT here — migrate.ts wraps each file in a transaction.

ALTER TABLE firm
  ADD COLUMN IF NOT EXISTS street_address TEXT,          -- Places formattedAddress (confident matches only)
  ADD COLUMN IF NOT EXISTS address_source TEXT;          -- provenance: 'google_places_resolve' | (future) 'dre_lookup'