SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0;
SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0;
SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='TRADITIONAL,ALLOW_INVALID_DATES';

ALTER TABLE `event`
ADD COLUMN `custom_field_data` TEXT NULL DEFAULT NULL AFTER `modified`;

ALTER TABLE `event_type`
ADD COLUMN `custom_field_list` TEXT NULL DEFAULT NULL AFTER `name`;

DROP TABLE IF EXISTS `event_race_day` ;

DROP TABLE IF EXISTS `event_non_race_day` ;

SET SQL_MODE=@OLD_SQL_MODE;
SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS;
SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS;