Chagnement nom tables + ajout tables stats

This commit is contained in:
2022-12-25 19:09:15 +01:00
parent 830d3c54c0
commit 0e85ce1156
3 changed files with 103 additions and 16 deletions

View File

@@ -3,7 +3,7 @@
-- https://www.phpmyadmin.net/
--
-- Host: localhost:3306
-- Generation Time: Dec 24, 2022 at 10:59 PM
-- Generation Time: Dec 25, 2022 at 06:12 PM
-- Server version: 8.0.31-0ubuntu0.20.04.1
-- PHP Version: 7.4.3
@@ -25,10 +25,10 @@ SET time_zone = "+00:00";
-- --------------------------------------------------------
--
-- Table structure for table `auteurs`
-- Table structure for table `borne_auteurs`
--
CREATE TABLE `auteurs` (
CREATE TABLE `borne_auteurs` (
`id` int NOT NULL,
`sexe` tinytext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci,
`age` tinyint DEFAULT NULL
@@ -37,10 +37,10 @@ CREATE TABLE `auteurs` (
-- --------------------------------------------------------
--
-- Table structure for table `avis_borne`
-- Table structure for table `borne_avis`
--
CREATE TABLE `avis_borne` (
CREATE TABLE `borne_avis` (
`id` int NOT NULL,
`id_auteur` int NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
@@ -101,13 +101,64 @@ INSERT INTO `sources` (`id`, `nom`) VALUES
-- --------------------------------------------------------
--
-- Table structure for table `stats_annee`
--
CREATE TABLE `stats_annee` (
`id` int NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`moyenne_globale` float NOT NULL,
`moyenne_site` float NOT NULL,
`moyenne_borne` float NOT NULL,
`moyenne_autres` text NOT NULL COMMENT 'Nombres séparés par des ; => moyennes spécifiques',
`dist_age` text NOT NULL COMMENT 'Distribution de l''age des auteurs',
`dist_sexe` text NOT NULL COMMENT 'Distribution du sexe des auteurs'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `stats_jour`
--
CREATE TABLE `stats_jour` (
`id` int NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`moyenne_globale` float NOT NULL,
`moyenne_site` float NOT NULL,
`moyenne_borne` float NOT NULL,
`moyenne_autres` text NOT NULL COMMENT 'Nombres séparés par des ; => moyennes spécifiques',
`dist_age` text NOT NULL COMMENT 'Distribution de l''age des auteurs',
`dist_sexe` text NOT NULL COMMENT 'Distribution du sexe des auteurs'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `stats_mois`
--
CREATE TABLE `stats_mois` (
`id` int NOT NULL,
`ddate` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`moyenne_globale` float NOT NULL,
`moyenne_site` float NOT NULL,
`moyenne_borne` float NOT NULL,
`moyenne_autres` text NOT NULL COMMENT 'Nombres séparés par des ; => moyennes spécifiques',
`dist_age` text NOT NULL COMMENT 'Distribution de l''age des auteurs',
`dist_sexe` text NOT NULL COMMENT 'Distribution du sexe des auteurs'
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
-- --------------------------------------------------------
--
-- Table structure for table `stats_semaine`
--
CREATE TABLE `stats_semaine` (
`id` int NOT NULL,
`date` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP,
`moyenne_globale` float NOT NULL,
`moyenne_site` float NOT NULL,
`moyenne_borne` float NOT NULL,
@@ -121,15 +172,15 @@ CREATE TABLE `stats_mois` (
--
--
-- Indexes for table `auteurs`
-- Indexes for table `borne_auteurs`
--
ALTER TABLE `auteurs`
ALTER TABLE `borne_auteurs`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `avis_borne`
-- Indexes for table `borne_avis`
--
ALTER TABLE `avis_borne`
ALTER TABLE `borne_avis`
ADD PRIMARY KEY (`id`);
--
@@ -150,26 +201,44 @@ ALTER TABLE `reseaux_sociaux_avis`
ALTER TABLE `sources`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `stats_annee`
--
ALTER TABLE `stats_annee`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `stats_jour`
--
ALTER TABLE `stats_jour`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `stats_mois`
--
ALTER TABLE `stats_mois`
ADD PRIMARY KEY (`id`);
--
-- Indexes for table `stats_semaine`
--
ALTER TABLE `stats_semaine`
ADD PRIMARY KEY (`id`);
--
-- AUTO_INCREMENT for dumped tables
--
--
-- AUTO_INCREMENT for table `auteurs`
-- AUTO_INCREMENT for table `borne_auteurs`
--
ALTER TABLE `auteurs`
ALTER TABLE `borne_auteurs`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `avis_borne`
-- AUTO_INCREMENT for table `borne_avis`
--
ALTER TABLE `avis_borne`
ALTER TABLE `borne_avis`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
@@ -190,11 +259,29 @@ ALTER TABLE `reseaux_sociaux_avis`
ALTER TABLE `sources`
MODIFY `id` int NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
--
-- AUTO_INCREMENT for table `stats_annee`
--
ALTER TABLE `stats_annee`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `stats_jour`
--
ALTER TABLE `stats_jour`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `stats_mois`
--
ALTER TABLE `stats_mois`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
--
-- AUTO_INCREMENT for table `stats_semaine`
--
ALTER TABLE `stats_semaine`
MODIFY `id` int NOT NULL AUTO_INCREMENT;
COMMIT;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;