CREATE TABLE `rq_phonics_gameqz_files` (
  `file_id` int(11) NOT NULL,
  `user_id` int(11) NOT NULL,
  `area_id` int(11) NOT NULL,
  `area` varchar(50) NOT NULL,
  `file_type` varchar(50) NOT NULL,
  `file_name` varchar(80) NOT NULL,
  `created_time` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
  `status` tinyint(1) NOT NULL DEFAULT '2' COMMENT '0: banned, 1: published, 2: pending'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `rq_phonics_gameqz_files_lang` (
  `file_id` int(11) NOT NULL,
  `lang` varchar(10) NOT NULL,
  `title` varchar(255) NOT NULL,
  `caption` text NOT NULL,
  `link` text NOT NULL,
  `link_target` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0: _self, 1: _blank'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
CREATE TABLE `rq_phonics_gameqz_files_priority` (
  `file_id` int(11) NOT NULL,
  `priority` int(11) NOT NULL DEFAULT '0'
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
ALTER TABLE `rq_phonics_gameqz_files` ADD PRIMARY KEY(`file_id`);
ALTER TABLE `rq_phonics_gameqz_files` CHANGE `file_id` `file_id` INT(11) NOT NULL AUTO_INCREMENT;
ALTER TABLE `rq_phonics`  ADD `gamequiz` INT(2) NULL DEFAULT '0'  AFTER `folder_id`,  ADD `gameqz_1` VARCHAR(20) NULL  AFTER `gamequiz`,  ADD `gameqz_2` VARCHAR(20) NULL  AFTER `gameqz_1`,  ADD `gameqz_3` VARCHAR(20) NULL  AFTER `gameqz_2`,  ADD `gameqz_4` VARCHAR(20) NULL  AFTER `gameqz_3`,  ADD `gameqz_5` VARCHAR(20) NULL  AFTER `gameqz_4`;
