CREATE TABLE `jsonDateCrash` (
  `supplierId` SMALLINT(5) UNSIGNED NOT NULL AUTO_INCREMENT,
  `supplierName` VARCHAR(128) NOT NULL,
  `supplierCaps` TEXT NOT NULL,
  `supplierSentToday` SMALLINT(6) NOT NULL,
  `supplierCapToday` SMALLINT(6) GENERATED ALWAYS AS (COALESCE(json_value(`supplierCaps`,CONCAT('$.',DAYNAME("2018-04-26"))),0)) VIRTUAL,
  PRIMARY KEY (`supplierId`),
  CONSTRAINT `capsIsValidJson` CHECK (JSON_VALID(`supplierCaps`))
) ENGINE=INNODB AUTO_INCREMENT=2 DEFAULT CHARSET=latin1;