Skip to content
This repository was archived by the owner on Apr 21, 2026. It is now read-only.

Commit 7aa6b99

Browse files
committed
wip
1 parent b47d627 commit 7aa6b99

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

public/miscellaneous/migrate-data.cfm

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ function buildInsert(required string tableName, required query data, required nu
172172
if (!structKeyExists(boolCols, colLower) && !structKeyExists(dateCols, colLower)) {
173173
var scanVal = arguments.data[col][r];
174174
if (!isNull(scanVal) && isDate(scanVal) && !(isSimpleValue(scanVal) && scanVal == "")
175-
&& (!isSimpleValue(scanVal) || reFind("^\d{4}[-/]\d{1,2}[-/]\d{1,2}", scanVal))) {
175+
&& (!isSimpleValue(scanVal) || reFind("(^\d{4}[-/]|^\{ts\s)", scanVal))) {
176176
dateCols[colLower] = true;
177177
}
178178
}
@@ -205,7 +205,7 @@ function buildInsert(required string tableName, required query data, required nu
205205
params[paramName] = { value: boolVal ? "true" : "false", cfsqltype: "cf_sql_varchar" };
206206
arrayAppend(placeholders, "CAST(:#paramName# AS BOOLEAN)");
207207
} else if (structKeyExists(dateCols, colLower) && isDate(val)
208-
&& (!isSimpleValue(val) || reFind("^\d{4}[-/]\d{1,2}[-/]\d{1,2}", val))) {
208+
&& (!isSimpleValue(val) || reFind("(^\d{4}[-/]|^\{ts\s)", val))) {
209209
// Convert timestamps to ISO string to avoid JDBC {ts '...'} escape format
210210
params[paramName] = { value: dateTimeFormat(val, "yyyy-MM-dd HH:nn:ss"), cfsqltype: "cf_sql_varchar" };
211211
arrayAppend(placeholders, "CAST(:#paramName# AS TIMESTAMP)");

0 commit comments

Comments
 (0)