Fix CFML hash escaping in brand color migration script

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
This commit is contained in:
John Mizerek 2026-01-28 15:17:46 -08:00
parent b75eb8530a
commit c6a45f7024

View file

@ -6,14 +6,14 @@ qBefore = queryExecute("
SELECT BusinessID, BusinessBrandColor
FROM Businesses
WHERE BusinessBrandColor LIKE :pattern
", { pattern: { value: "#%", cfsqltype: "cf_sql_varchar" } }, { datasource: "payfrit" });
", { pattern: { value: "##%", cfsqltype: "cf_sql_varchar" } }, { datasource: "payfrit" });
if (qBefore.recordCount > 0) {
queryExecute("
UPDATE Businesses
SET BusinessBrandColor = SUBSTRING(BusinessBrandColor, 2)
WHERE BusinessBrandColor LIKE :pattern
", { pattern: { value: "#%", cfsqltype: "cf_sql_varchar" } }, { datasource: "payfrit" });
", { pattern: { value: "##%", cfsqltype: "cf_sql_varchar" } }, { datasource: "payfrit" });
}
qAfter = queryExecute("