-- Link Meshkee businesses to legacy WillaEngine business ids for selective migration

ALTER TABLE businesses
  ADD COLUMN IF NOT EXISTS old_business_id BIGINT;

CREATE UNIQUE INDEX IF NOT EXISTS businesses_old_business_id_unique
  ON businesses (old_business_id)
  WHERE old_business_id IS NOT NULL;
