ALTER TABLE users
  ADD COLUMN auth_provider VARCHAR(16) NOT NULL DEFAULT 'local',
  ADD COLUMN external_id VARCHAR(512) NULL,
  ADD COLUMN external_dn TEXT NULL,
  ADD UNIQUE INDEX idx_users_external_identity (auth_provider, external_id);
