INSERT INTO `boconfig` (`PK_boconfig_id`, `libelle_boconfig`, `modification_boconfig`, `type_boconfig`, `value_boconfig`, `actif_boconfig`) VALUES
(NULL, 'MDP_necessaire', '0000-00-00 00:00:00', 8, '1', 1),
(NULL, 'MDP_generique', '0000-00-00 00:00:00', 0, 'MDP2test!', 1),
(NULL, 'event_date', '0000-00-00 00:00:00', 3, '2021-10-06', 1),
(NULL, 'event_time', '0000-00-00 00:00:00', 4, '15:30', 1),
(NULL, 'event_compteur', '0000-00-00 00:00:00', 8, '1', 1),
(NULL, 'iframe_live', '0000-00-00 00:00:00', 0, 'https://player.vimeo.com/video/502183722?h=4040e31e74%22', 1),
(NULL, 'iframe_chat', '0000-00-00 00:00:00', 0, '', 1),
(NULL, 'is_post_event', '0000-00-00 00:00:00', 8, '1', 1),
(NULL, 'logo', '0000-00-00 00:00:00', 7, '', 1),
(NULL, 'backImage', '0000-00-00 00:00:00', 7, '', 1),
(NULL, 'texte_color', '0000-00-00 00:00:00', 5, '#1c2135', 1),
(NULL, 'mail_necessaire', '0000-00-00 00:00:00', 8, '1', 1),
(NULL, 'google_font', '0000-00-00 00:00:00', 0, 'Roboto', 1),
(NULL, 'root_font_size', '2021-12-23 16:00:01', 1, '16', 1),
(NULL, 'h1_font_size', '2021-12-23 16:01:59', 0, '3em', 1),
(NULL, 'max_height_logo', '2021-12-23 16:01:47', 1, '200', 1);


INSERT INTO `rubrique` (`PK_rubrique_id`, `libelle_rubrique`, `titre`, `content`, `titre_temp`, `content_temp`, `date_update`, `time_update`, `meta`, `description`, `url`, `direct`, `no_log`, `link`, `icon`, `cache_rubrique`, `actif_rubrique`) VALUES
(NULL, 'Avant l\'Event', 'Pre-Event', '<p style=\"text-align: center;\">Texte sur la page avant Event</p>\r\n', '', '', '0000-00-00', '00:00:00', '', '', 'bientot', 0, 0, '', '', 1, 2),
(NULL, 'Après l\'event', 'Le Replay', '<p>Texte sur la page replay</p>\r\n', '', '', '0000-00-00', '00:00:00', '', '', 'replay', 0, 0, '', '', 1, 2),
(NULL, 'Pendant l\'event', 'L\'évenement', '<p>Texte sur la page de Live</p>\r\n', '', '', '0000-00-00', '00:00:00', '', '', 'live', 0, 0, '', '', 1, 2),
(NULL, 'Connexion à l\'event', 'Titre de la page de connexion', '<p>Pour&nbsp;une&nbsp;expérience&nbsp;optimale,&nbsp;nous&nbsp;vous&nbsp;conseillons&nbsp;d\'utiliser&nbsp;l’un&nbsp;des&nbsp;navigateurs&nbsp;suivants&nbsp;:&nbsp;Google&nbsp;Chrome,&nbsp;Mozilla&nbsp;Firefox&nbsp;ou&nbsp;Edge.&nbsp;L\'utilisation&nbsp;d\'Internet&nbsp;Explorer&nbsp;est&nbsp;fortement&nbsp;déconseillée.</p>\r\n', '', '', '0000-00-00', '00:00:00', '', '', 'login', 0, 0, NULL, '', 1, 2);

INSERT INTO `rubrique_module` (`PK_rubrique_module_id`, `namespace`, `libelle_rubrique_module`, `controller`, `action`, `forward`, `position`, `manual`, `actif_rubrique_module`) VALUES
(NULL, 'Pleniereprive', 'PlenierePreEvent', 'Pleniere', 'preEvent', 0, 'after', 1, 1),
(NULL, 'Pleniereprive', 'PlenierePostEvent', 'Pleniere', 'postEvent', 0, 'after', 1, 1),
(NULL, 'Pleniereprive', 'PleniereInEvent', 'Pleniere', 'inEvent', 0, 'after', 1, 1),
(NULL, 'Pleniereprive', 'PleniereLogin', 'Pleniere', 'login', 1, 'after', 1, 1);

INSERT INTO `rubrique_module_liste` (`PK_rubrique_module_liste_id`, `FK_rubrique_id`, `FK_rubrique_module_id`) VALUES
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Avant l\'Event' LIMIT 1 ), (SELECT PK_rubrique_module_id FROM `rubrique_module` WHERE `libelle_rubrique_module` LIKE 'PlenierePreEvent' LIMIT 1)),
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Après l\'event' LIMIT 1 ), (SELECT PK_rubrique_module_id FROM `rubrique_module` WHERE `libelle_rubrique_module` LIKE 'PlenierePostEvent' LIMIT 1)),
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Pendant l\'event' LIMIT 1 ), (SELECT PK_rubrique_module_id FROM `rubrique_module` WHERE `libelle_rubrique_module` LIKE 'PleniereInEvent' LIMIT 1)),
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Connexion à l\'event' LIMIT 1 ), (SELECT PK_rubrique_module_id FROM `rubrique_module` WHERE `libelle_rubrique_module` LIKE 'PleniereLogin' LIMIT 1));

INSERT INTO `rubrique_ordre` (`PK_rubrique_ordre_id`, `FK_rubrique_id`, `FK_rubrique_parent_id`, `FK_rubrique_type_id`, `FK_rubrique_position_id`, `ordre_rubrique`) VALUES
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Avant l\'Event' LIMIT 1 ), '0', '1', '1', (SELECT * FROM (SELECT MAX(ordre_rubrique)+1 AS max FROM `rubrique_ordre`) as t)),
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Après l\'event' LIMIT 1 ), '0', '1', '1', (SELECT * FROM (SELECT MAX(ordre_rubrique)+1 AS max FROM `rubrique_ordre`) as t)),
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Pendant l\'event' LIMIT 1 ),'0', '1', '1', (SELECT * FROM (SELECT MAX(ordre_rubrique)+1 AS max FROM `rubrique_ordre`) as t)),
(NULL, (SELECT PK_rubrique_id FROM `rubrique` WHERE `libelle_rubrique` LIKE 'Connexion à l\'event' LIMIT 1 ), '0', '1', '1', (SELECT * FROM (SELECT MAX(ordre_rubrique)+1 AS max FROM `rubrique_ordre`) as t));


DROP TABLE IF EXISTS `connexion_log`;
CREATE TABLE `connexion_log` (
  `PK_connexion_log_id` int NOT NULL,
  `FK_users_id` int NOT NULL,
  `date_connexion_log` datetime NOT NULL,
  `email` text CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci NOT NULL
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;

ALTER TABLE `connexion_log`
  ADD PRIMARY KEY (`PK_connexion_log_id`);

ALTER TABLE `connexion_log`
  MODIFY `PK_connexion_log_id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=1;


