← back to Small Business Builder

migrations/003_neighborhood_display_name.sql

8 lines

-- Add columns added ad-hoc to local DB before being captured in migrations.
-- Idempotent: ADD COLUMN IF NOT EXISTS so re-running on the local DB is a no-op.

ALTER TABLE businesses ADD COLUMN IF NOT EXISTS neighborhood TEXT;
ALTER TABLE businesses ADD COLUMN IF NOT EXISTS display_name TEXT;

CREATE INDEX IF NOT EXISTS businesses_neighborhood_idx ON businesses(neighborhood) WHERE neighborhood IS NOT NULL;