DROP TABLE IF EXISTS `interactive_videos`;
CREATE TABLE `interactive_videos` (
  `PK_interactive_videos_id` int NOT NULL,
  `libelle_interactive_videos` varchar(220) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `file_interactive_videos` varchar(500) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `mute_interactive_videos` int NOT NULL DEFAULT '0',
  `loop_interactive_videos` int NOT NULL DEFAULT '0',
  `autoplay_interactive_videos` int NOT NULL DEFAULT '0',
  `default_interactive_videos` int NOT NULL DEFAULT '0',
  `actif_interactive_videos` int NOT NULL DEFAULT '1'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `interactive_videos_spots`;
CREATE TABLE `interactive_videos_spots` (
  `PK_interactive_videos_spots_id` int NOT NULL,
  `FK_interactive_videos_id` int NOT NULL,
  `FK_interactive_videos_spots_type_id` int NOT NULL,
  `libelle_interactive_videos_spots` varchar(220) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `x_interactive_videos_spots` float NOT NULL,
  `y_interactive_videos_spots` float NOT NULL,
  `z_interactive_videos_spots` float NOT NULL,
  `scale_interactive_videos_spots` float NOT NULL,
  `content_interactive_videos_spots` text CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL,
  `icon_interactive_videos_spots` varchar(220) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `actif_interactive_videos_spots` int NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;

DROP TABLE IF EXISTS `interactive_videos_spots_type`;
CREATE TABLE `interactive_videos_spots_type` (
  `PK_interactive_videos_spots_type_id` int NOT NULL,
  `libelle_interactive_videos_spots_type` varchar(220) CHARACTER SET utf8 COLLATE utf8_unicode_ci NOT NULL DEFAULT '',
  `pop_interactive_videos_spots_type` int NOT NULL DEFAULT '0',
  `frame_interactive_videos_spots_type` int NOT NULL DEFAULT '0',
  `html_interactive_videos_spots_type` int NOT NULL DEFAULT '0',
  `script_interactive_videos_spots_type` int NOT NULL DEFAULT '0',
  `actif_interactive_videos_spots_type` int NOT NULL DEFAULT '1'
) ENGINE=MyISAM DEFAULT CHARSET=utf8 COLLATE=utf8_unicode_ci;


ALTER TABLE `interactive_videos`
  ADD PRIMARY KEY (`PK_interactive_videos_id`),
  ADD KEY `actif_interactive_videos` (`actif_interactive_videos`),
  ADD KEY `libelle_interactive_videos` (`libelle_interactive_videos`),
  ADD KEY `default_interactive_videos` (`default_interactive_videos`);

ALTER TABLE `interactive_videos_spots`
  ADD PRIMARY KEY (`PK_interactive_videos_spots_id`) USING BTREE,
  ADD KEY `FK_interactive_videos_spots_type_id` (`FK_interactive_videos_spots_type_id`),
  ADD KEY `libelle_interactive_videos_spots` (`libelle_interactive_videos_spots`),
  ADD KEY `actif_interactive_videos_spots` (`actif_interactive_videos_spots`),
  ADD KEY `FK_interactive_videos_id` (`FK_interactive_videos_id`);

ALTER TABLE `interactive_videos_spots_type`
  ADD PRIMARY KEY (`PK_interactive_videos_spots_type_id`),
  ADD KEY `libelle_interactive_videos_spots_type` (`libelle_interactive_videos_spots_type`),
  ADD KEY `actif_interactive_videos_spots_type` (`actif_interactive_videos_spots_type`);


ALTER TABLE `interactive_videos`
  MODIFY `PK_interactive_videos_id` int NOT NULL AUTO_INCREMENT;

ALTER TABLE `interactive_videos_spots`
  MODIFY `PK_interactive_videos_spots_id` int NOT NULL AUTO_INCREMENT;

ALTER TABLE `interactive_videos_spots_type`
  MODIFY `PK_interactive_videos_spots_type_id` int NOT NULL AUTO_INCREMENT;
COMMIT;
