205 lines
6.0 KiB
MySQL
205 lines
6.0 KiB
MySQL
|
-- phpMyAdmin SQL Dump
|
||
|
-- version 4.9.5
|
||
|
-- https://www.phpmyadmin.net/
|
||
|
--
|
||
|
-- Hôte : db120904.sql-pro.online.net
|
||
|
-- Généré le : ven. 23 avr. 2021 à 10:40
|
||
|
-- Version du serveur : 5.7.19-0ubuntu0.16.04.1
|
||
|
-- Version de PHP : 7.0.32-0ubuntu0.16.04.1
|
||
|
|
||
|
SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
|
||
|
SET AUTOCOMMIT = 0;
|
||
|
START TRANSACTION;
|
||
|
SET time_zone = "+00:00";
|
||
|
|
||
|
|
||
|
/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
|
||
|
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
|
||
|
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
|
||
|
/*!40101 SET NAMES utf8mb4 */;
|
||
|
|
||
|
--
|
||
|
-- Base de données : `db351634_avionpoeme`
|
||
|
--
|
||
|
CREATE DATABASE IF NOT EXISTS `db351634_avionpoeme` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
|
||
|
USE `db351634_avionpoeme`;
|
||
|
|
||
|
-- --------------------------------------------------------
|
||
|
|
||
|
--
|
||
|
-- Structure de la table `avionPeripetie`
|
||
|
--
|
||
|
|
||
|
CREATE TABLE `avionPeripetie` (
|
||
|
`idAP` int(10) UNSIGNED NOT NULL,
|
||
|
`idAvion` int(10) UNSIGNED NOT NULL,
|
||
|
`idPeripetie` int(10) UNSIGNED NOT NULL,
|
||
|
`date` datetime NOT NULL,
|
||
|
`mailSent` tinyint(1) NOT NULL DEFAULT '0'
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='Stock les péripeties de chaque avion';
|
||
|
|
||
|
-- --------------------------------------------------------
|
||
|
|
||
|
--
|
||
|
-- Structure de la table `avionpoeme`
|
||
|
--
|
||
|
|
||
|
CREATE TABLE `avionpoeme` (
|
||
|
`idAvion` int(10) UNSIGNED NOT NULL,
|
||
|
`message` text CHARACTER SET utf8mb4 NOT NULL,
|
||
|
`expeMail` text NOT NULL,
|
||
|
`expeKnown` tinyint(1) NOT NULL DEFAULT '0' COMMENT ' true/false en fonction de si l''utilisateur choisi de devoiler son addresse mail pour la premiere',
|
||
|
`expeLang` varchar(3) NOT NULL DEFAULT 'fr' COMMENT ' langue de l''envoyeur format 2 lettres (''en'',''fr'',''ar'')',
|
||
|
`destLang` varchar(3) NOT NULL COMMENT 'langue du destinataire format 2 lettres (''en'',''fr'',''ar'')',
|
||
|
`startLat` float NOT NULL,
|
||
|
`startLon` float NOT NULL,
|
||
|
`startName` text NOT NULL,
|
||
|
`startTime` timestamp NOT NULL COMMENT 'unix time en TZ du depart',
|
||
|
`startTZ` text CHARACTER SET utf8mb4 NOT NULL,
|
||
|
`destMail` text NOT NULL,
|
||
|
`destLat` float NOT NULL,
|
||
|
`destLon` float NOT NULL,
|
||
|
`destName` text NOT NULL,
|
||
|
`public` tinyint(1) NOT NULL COMMENT '0 = privé 1=public, 2=supprimé',
|
||
|
`color` varchar(9) NOT NULL COMMENT ' le code hexa de la couleur de l''avion aleatoire parmis la liste.',
|
||
|
`deliveryTime` timestamp NOT NULL,
|
||
|
`deliveryTZ` text NOT NULL,
|
||
|
`deliveryTimeServer` timestamp NOT NULL,
|
||
|
`deliveryMethod` text CHARACTER SET utf8mb4 NOT NULL,
|
||
|
`atteri` tinyint(1) NOT NULL DEFAULT '0'
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||
|
|
||
|
-- --------------------------------------------------------
|
||
|
|
||
|
--
|
||
|
-- Structure de la table `courriels`
|
||
|
--
|
||
|
|
||
|
CREATE TABLE `courriels` (
|
||
|
`id` int(10) UNSIGNED NOT NULL,
|
||
|
`destinataire` text NOT NULL,
|
||
|
`objet` text NOT NULL,
|
||
|
`message` text NOT NULL,
|
||
|
`html` tinyint(1) NOT NULL COMMENT 'false = text, true = html'
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='stockage des courriels en attente d''envoie';
|
||
|
|
||
|
-- --------------------------------------------------------
|
||
|
|
||
|
--
|
||
|
-- Structure de la table `logs`
|
||
|
--
|
||
|
|
||
|
CREATE TABLE `logs` (
|
||
|
`id_log` int(11) NOT NULL,
|
||
|
`date` datetime NOT NULL,
|
||
|
`auteur` varchar(10) NOT NULL,
|
||
|
`log` text NOT NULL,
|
||
|
`niveau` tinyint(4) NOT NULL
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||
|
|
||
|
-- --------------------------------------------------------
|
||
|
|
||
|
--
|
||
|
-- Structure de la table `peripeties`
|
||
|
--
|
||
|
|
||
|
CREATE TABLE `peripeties` (
|
||
|
`idPeripetie` int(11) NOT NULL,
|
||
|
`indexText` text NOT NULL COMMENT 'Contient l''index pour la traduction',
|
||
|
`probabilite` decimal(5,1) UNSIGNED NOT NULL COMMENT 'en pourcentage',
|
||
|
`effet` tinyint(11) NOT NULL COMMENT '-x => diminue la vitesse de l''avion de x, +x augmente la vitesse de l''avion de x, 0 => avion détruit',
|
||
|
`quand` date DEFAULT NULL,
|
||
|
`quand_fonction` text
|
||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4;
|
||
|
|
||
|
--
|
||
|
-- Déchargement des données de la table `peripeties`
|
||
|
--
|
||
|
|
||
|
INSERT INTO `peripeties` (`idPeripetie`, `indexText`, `probabilite`, `effet`, `quand`, `quand_fonction`) VALUES
|
||
|
(1, 'Peripetie_Perturbation', '20.0', 15, NULL, NULL),
|
||
|
(2, 'Peripetie_Vents_porteurs', '20.0', -15, NULL, NULL),
|
||
|
(3, 'Peripetie_Collision_Oiseau', '0.5', 0, NULL, NULL),
|
||
|
(4, 'Peripetie_OVNI', '0.5', 0, NULL, NULL),
|
||
|
(5, 'Peripetie_Drone', '0.5', 0, NULL, NULL),
|
||
|
(6, 'Peripetie_LogicielLibre', '100.0', 0, '2021-04-05', NULL),
|
||
|
(7, 'Peripetie_Poesie', '100.0', 0, '2022-03-21', NULL);
|
||
|
|
||
|
--
|
||
|
-- Index pour les tables déchargées
|
||
|
--
|
||
|
|
||
|
--
|
||
|
-- Index pour la table `avionPeripetie`
|
||
|
--
|
||
|
ALTER TABLE `avionPeripetie`
|
||
|
ADD PRIMARY KEY (`idAP`);
|
||
|
|
||
|
--
|
||
|
-- Index pour la table `avionpoeme`
|
||
|
--
|
||
|
ALTER TABLE `avionpoeme`
|
||
|
ADD PRIMARY KEY (`idAvion`),
|
||
|
ADD UNIQUE KEY `status_index` (`idAvion`),
|
||
|
ADD KEY `expe_mail_index` (`expeMail`(40)),
|
||
|
ADD KEY `dest_mail_index` (`destMail`(40)),
|
||
|
ADD KEY `delivery_date_index` (`deliveryTime`);
|
||
|
|
||
|
--
|
||
|
-- Index pour la table `courriels`
|
||
|
--
|
||
|
ALTER TABLE `courriels`
|
||
|
ADD PRIMARY KEY (`id`);
|
||
|
|
||
|
--
|
||
|
-- Index pour la table `logs`
|
||
|
--
|
||
|
ALTER TABLE `logs`
|
||
|
ADD PRIMARY KEY (`id_log`),
|
||
|
ADD KEY `date_index` (`date`);
|
||
|
|
||
|
--
|
||
|
-- Index pour la table `peripeties`
|
||
|
--
|
||
|
ALTER TABLE `peripeties`
|
||
|
ADD PRIMARY KEY (`idPeripetie`);
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT pour les tables déchargées
|
||
|
--
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT pour la table `avionPeripetie`
|
||
|
--
|
||
|
ALTER TABLE `avionPeripetie`
|
||
|
MODIFY `idAP` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT pour la table `avionpoeme`
|
||
|
--
|
||
|
ALTER TABLE `avionpoeme`
|
||
|
MODIFY `idAvion` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT pour la table `courriels`
|
||
|
--
|
||
|
ALTER TABLE `courriels`
|
||
|
MODIFY `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT;
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT pour la table `logs`
|
||
|
--
|
||
|
ALTER TABLE `logs`
|
||
|
MODIFY `id_log` int(11) NOT NULL AUTO_INCREMENT;
|
||
|
|
||
|
--
|
||
|
-- AUTO_INCREMENT pour la table `peripeties`
|
||
|
--
|
||
|
ALTER TABLE `peripeties`
|
||
|
MODIFY `idPeripetie` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=8;
|
||
|
COMMIT;
|
||
|
|
||
|
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
|
||
|
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
|
||
|
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
|