DROP TABLE IF EXISTS `question`;
CREATE TABLE `question` (
  `PK_question_id` int NOT NULL,
  `FK_users_id` int NOT NULL DEFAULT '0',
  `question` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `date_question` datetime NOT NULL,
  `valid_question` int NOT NULL DEFAULT '0',
  `online_question` int NOT NULL DEFAULT '0',
  `actif_question` int NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `video`;
CREATE TABLE `video` (
  `PK_video_id` int NOT NULL,
  `video_link` text COLLATE utf8_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

INSERT INTO `video` (`PK_video_id`, `video_link`) VALUES
(1, '');

ALTER TABLE `question`
  ADD PRIMARY KEY (`PK_question_id`),
  ADD KEY `FK_users_id` (`FK_users_id`),
  ADD KEY `date_question` (`date_question`),
  ADD KEY `valid_question` (`valid_question`),
  ADD KEY `online_question` (`online_question`),
  ADD KEY `actif_question` (`actif_question`);

ALTER TABLE `video`
  ADD PRIMARY KEY (`PK_video_id`);


ALTER TABLE `question`
  MODIFY `PK_question_id` int NOT NULL AUTO_INCREMENT;

ALTER TABLE `video`
  MODIFY `PK_video_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=2;
COMMIT;