ALTER TABLE `courses`
  ADD COLUMN `price` decimal(10,2) NOT NULL DEFAULT 0.00 AFTER `name`;

UPDATE `courses`
SET `price` = CAST(JSON_UNQUOTE(JSON_EXTRACT(`raw_payload`, '$.price')) AS DECIMAL(10,2))
WHERE JSON_EXTRACT(`raw_payload`, '$.price') IS NOT NULL
  AND JSON_UNQUOTE(JSON_EXTRACT(`raw_payload`, '$.price')) REGEXP '^-?[0-9]+(\\.[0-9]+)?$';

ALTER TABLE `courses`
  DROP COLUMN `raw_payload`;
