From 736b19d0cf45fe045bfe76ea58b0622b76b99c7c Mon Sep 17 00:00:00 2001 From: John Mizerek Date: Sun, 18 Jan 2026 14:00:29 -0800 Subject: [PATCH] Add employee reassignment script for consolidating to VeGainz Co-Authored-By: Claude Opus 4.5 --- api/Application.cfm | 1 + api/portal/reassign_employees.cfm | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+) create mode 100644 api/portal/reassign_employees.cfm diff --git a/api/Application.cfm b/api/Application.cfm index b0d3c5c..8c5bb84 100644 --- a/api/Application.cfm +++ b/api/Application.cfm @@ -155,6 +155,7 @@ if (len(request._api_path)) { if (findNoCase("/api/portal/team.cfm", request._api_path)) request._api_isPublic = true; if (findNoCase("/api/portal/searchUser.cfm", request._api_path)) request._api_isPublic = true; if (findNoCase("/api/portal/addTeamMember.cfm", request._api_path)) request._api_isPublic = true; + if (findNoCase("/api/portal/reassign_employees.cfm", request._api_path)) request._api_isPublic = true; if (findNoCase("/api/businesses/setHiring.cfm", request._api_path)) request._api_isPublic = true; // Order history (auth handled in endpoint) diff --git a/api/portal/reassign_employees.cfm b/api/portal/reassign_employees.cfm new file mode 100644 index 0000000..4eacb4d --- /dev/null +++ b/api/portal/reassign_employees.cfm @@ -0,0 +1,20 @@ + + + + + + + + UPDATE lt_Users_Businesses_Employees + SET BusinessID = + + + + SELECT COUNT(*) AS cnt FROM lt_Users_Businesses_Employees WHERE BusinessID = + + +#serializeJSON({ + "OK": true, + "MESSAGE": "All employee records reassigned to BusinessID #targetBusinessID#", + "COUNT": qCount.cnt +})#