-- Deploy gaia:create_table_serviceactivity to mysql

CREATE TABLE `api_serviceactivity` (
  `id` int(11) NOT NULL AUTO_INCREMENT,
  `name` varchar(200) NOT NULL,
  `activity_type` char(1) NOT NULL,
  `special_id` int(11) DEFAULT NULL,
  `position` int(11) DEFAULT '1',
  `image` varchar(200) DEFAULT NULL,
  `update_time` datetime NOT NULL,
  PRIMARY KEY (`id`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8;

ALTER TABLE `api_serviceactivity` ADD CONSTRAINT `api_serviceactivity_special_id_ref_api_special` FOREIGN KEY (`special_id`) REFERENCES `api_special` (`id`) ON DELETE CASCADE;
