Bug
DataMachine\Core\Database\Jobs\Jobs::migrate_task_type_column() uses JSON_UNQUOTE(JSON_EXTRACT(...)) which fails on SQLite (WordPress Studio uses sqlite-database-integration).
Error
SQLSTATE[HY000]: General error: 1 no such function: JSON_UNQUOTE
Query:
UPDATE wp_datamachine_jobs
SET task_type = JSON_UNQUOTE(JSON_EXTRACT(engine_data, '$.task_type'))
WHERE source IN ('system', 'pipeline_system_task')
AND engine_data IS NOT NULL
AND JSON_EXTRACT(engine_data, '$.task_type') IS NOT NULL
AND task_type IS NULL
Context
Hit during wp plugin activate data-machine on a fresh WordPress Studio site (SQLite backend). The table creation succeeds but the migration query fails. Plugin still activates but the migration is skipped.
Stack
Jobs.php:409 → Jobs.php:160 → data-machine.php:553 → data-machine.php:507
Fix
SQLite supports json_extract() but not JSON_UNQUOTE(). Since json_extract() on SQLite already returns unquoted strings, the fix is to conditionally skip JSON_UNQUOTE when on SQLite, or use a compatible alternative.
Bug
DataMachine\Core\Database\Jobs\Jobs::migrate_task_type_column()usesJSON_UNQUOTE(JSON_EXTRACT(...))which fails on SQLite (WordPress Studio uses sqlite-database-integration).Error
Query:
Context
Hit during
wp plugin activate data-machineon a fresh WordPress Studio site (SQLite backend). The table creation succeeds but the migration query fails. Plugin still activates but the migration is skipped.Stack
Jobs.php:409 → Jobs.php:160 → data-machine.php:553 → data-machine.php:507Fix
SQLite supports
json_extract()but notJSON_UNQUOTE(). Sincejson_extract()on SQLite already returns unquoted strings, the fix is to conditionally skipJSON_UNQUOTEwhen on SQLite, or use a compatible alternative.