delimiter //

CREATE TRIGGER recorded_check_insert BEFORE INSERT ON recorded
FOR EACH ROW
BEGIN
  IF NEW.subtitle = '\0' THEN
    SET NEW.subtitle = '';
  END IF;
  IF NEW.description = '\0' THEN
    SET NEW.description = '';
  END IF;
END;//

CREATE TRIGGER recorded_check_update BEFORE UPDATE ON recorded
FOR EACH ROW
BEGIN
  IF NEW.subtitle = '\0' THEN
    SET NEW.subtitle = '';
  END IF;
  IF NEW.description = '\0' THEN
    SET NEW.description = '';
  END IF;
END;//

CREATE TRIGGER program_check_insert BEFORE INSERT ON program
FOR EACH ROW
BEGIN
  IF NEW.subtitle = '\0' THEN
    SET NEW.subtitle = '';
  END IF;
  IF NEW.description = '\0' THEN
    SET NEW.description = '';
  END IF;
END;//

CREATE TRIGGER program_check_update BEFORE UPDATE ON program
FOR EACH ROW
BEGIN
  IF NEW.subtitle = '\0' THEN
    SET NEW.subtitle = '';
  END IF;
  IF NEW.description = '\0' THEN
    SET NEW.description = '';
  END IF;
END;//

delimiter ;
