← back to Lawyer Directory Builder

migrations/006_app_users_profile.sql

12 lines

-- Add the 5 signup-form fields directly on app_users.
-- (We could derive firm_name/website from organizations via organization_id,
-- but storing the user-entered values keeps the auth flow simple and lets the
-- user override the directory data if it's stale.)

ALTER TABLE app_users
  ADD COLUMN IF NOT EXISTS firm_name TEXT,
  ADD COLUMN IF NOT EXISTS website   TEXT,
  ADD COLUMN IF NOT EXISTS phone     TEXT;

CREATE INDEX IF NOT EXISTS idx_app_users_firm_name ON app_users(LOWER(firm_name));