ALTER TABLE auth_login_logs
  ADD COLUMN auth_source VARCHAR(40) NOT NULL DEFAULT 'admin_portal' AFTER reason,
  ADD KEY idx_login_logs_source (auth_source);

UPDATE auth_login_logs
SET auth_source = 'employee_portal',
    reason = CASE
      WHEN reason = 'employee_portal' THEN NULL
      ELSE reason
    END
WHERE identifier LIKE 'employee-portal:%'
   OR reason = 'employee_portal'
   OR reason = 'invalid_employee_portal_credentials';
