Converts 200+ endpoint files to use queryTimed() wrapper which tracks DB query count and execution time. Restores perf dashboard files that were accidentally moved to _scripts/. Includes portal UI updates.
37 lines
1 KiB
Text
37 lines
1 KiB
Text
<cfsetting showdebugoutput="false">
|
|
<cfcontent type="application/json; charset=utf-8" reset="true">
|
|
|
|
<cfscript>
|
|
// Add CategoryID column to tt_TaskTypes (Services) table
|
|
try {
|
|
// Check if column exists
|
|
qCheck = queryTimed("
|
|
SELECT COLUMN_NAME FROM INFORMATION_SCHEMA.COLUMNS
|
|
WHERE TABLE_SCHEMA = 'payfrit'
|
|
AND TABLE_NAME = 'tt_TaskTypes'
|
|
AND COLUMN_NAME = 'TaskCategoryID'
|
|
", [], { datasource: "payfrit" });
|
|
|
|
if (qCheck.recordCount == 0) {
|
|
queryTimed("
|
|
ALTER TABLE tt_TaskTypes
|
|
ADD COLUMN TaskCategoryID INT NULL
|
|
", [], { datasource: "payfrit" });
|
|
|
|
writeOutput(serializeJSON({
|
|
"OK": true,
|
|
"MESSAGE": "Column TaskCategoryID added to tt_TaskTypes"
|
|
}));
|
|
} else {
|
|
writeOutput(serializeJSON({
|
|
"OK": true,
|
|
"MESSAGE": "Column already exists"
|
|
}));
|
|
}
|
|
} catch (any e) {
|
|
writeOutput(serializeJSON({
|
|
"OK": false,
|
|
"ERROR": e.message
|
|
}));
|
|
}
|
|
</cfscript>
|