Skip to content
Snippets Groups Projects
Select Git revision
  • 7ea36ca6be98be0ab6c43c9d7fc62e257ebfea37
  • main default protected
  • jw_sonar
  • v6.0.0 protected
  • interactive-mode-preference
  • bedran_exercise-list
  • add_route_user
  • Jw_sonar_backup
  • exercise_list_filter
  • assignment_filter
  • add_route_assignments
  • move-to-esm-only
  • 6.0.0-dev
  • Pre-alpha
  • 5.0.0
  • Latest
  • 4.2.0
  • 4.1.1
  • 4.1.0
  • 4.0.1
  • 4.0.0
  • 3.5.0
  • 3.4.2
  • 3.4.1
  • 3.3.0
  • 3.2.3
  • 3.2.2
  • 3.2.0
  • 3.1.2
  • 3.1.1
  • 3.1.0
  • 3.0.1
32 results

SessionAppLogoutCommand.ts

Blame
  • 1-Dojo.sql 4.24 KiB
    SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
    START TRANSACTION;
    SET time_zone = "+00:00";
    
    --
    -- Base de données : `Dojo`
    --
    CREATE DATABASE IF NOT EXISTS `Dojo` DEFAULT CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci;
    USE `Dojo`;
    
    -- --------------------------------------------------------
    
    --
    -- Structure de la table `Enonce`
    --
    
    CREATE TABLE `Enonce` (
      `enonceID` int(11) NOT NULL,
      `enonceName` varchar(64) NOT NULL,
      `enonceGitLink` text NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    
    -- --------------------------------------------------------
    
    --
    -- Structure de la table `EnonceStaff`
    --
    
    CREATE TABLE `EnonceStaff` (
      `enonceID` int(11) NOT NULL,
      `userID` int(11) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    
    -- --------------------------------------------------------
    
    --
    -- Structure de la table `Exercice`
    --
    
    CREATE TABLE `Exercice` (
      `exerciceID` int(11) NOT NULL,
      `exerciceEnonceID` int(11) NOT NULL,
      `exerciceProjectKey` varchar(36) NOT NULL,
      `exerciceGitLink` text NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    
    -- --------------------------------------------------------
    
    --
    -- Structure de la table `ExerciceMembers`
    --
    
    CREATE TABLE `ExerciceMembers` (
      `exerciceID` int(11) NOT NULL,
      `userID` int(11) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    
    -- --------------------------------------------------------
    
    --
    -- Structure de la table `Results`
    --
    
    CREATE TABLE `Results` (
      `resultTimestamp` bigint(20) NOT NULL,
      `resultExerciceID` int(11) NOT NULL,
      `resultPass` tinyint(1) NOT NULL,
      `resultDetails` text NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    
    -- --------------------------------------------------------
    
    --
    -- Structure de la table `Users`
    --
    
    CREATE TABLE `Users` (
      `userID` int(11) NOT NULL,
      `userFirstname` varchar(32) NOT NULL,
      `userLastname` varchar(32) NOT NULL,
      `userMail` varchar(32) NOT NULL,
      `userRole` varchar(8) NOT NULL
    ) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_general_ci;
    
    --
    -- Index pour les tables déchargées
    --
    
    --
    -- Index pour la table `Enonce`
    --
    ALTER TABLE `Enonce`
      ADD PRIMARY KEY (`enonceID`);
    
    --
    -- Index pour la table `EnonceStaff`
    --
    ALTER TABLE `EnonceStaff`
      ADD PRIMARY KEY (`enonceID`,`userID`),
      ADD KEY `userID` (`userID`);
    
    --
    -- Index pour la table `Exercice`
    --
    ALTER TABLE `Exercice`
      ADD PRIMARY KEY (`exerciceID`),
      ADD KEY `exerciceEnonceID` (`exerciceEnonceID`);
    
    --
    -- Index pour la table `ExerciceMembers`
    --
    ALTER TABLE `ExerciceMembers`
      ADD PRIMARY KEY (`exerciceID`,`userID`),
      ADD KEY `userID` (`userID`);
    
    --
    -- Index pour la table `Results`
    --
    ALTER TABLE `Results`
      ADD PRIMARY KEY (`resultTimestamp`,`resultExerciceID`),
      ADD KEY `resultExerciceID` (`resultExerciceID`);
    
    --
    -- Index pour la table `Users`
    --
    ALTER TABLE `Users`
      ADD PRIMARY KEY (`userID`);
    
    --
    -- AUTO_INCREMENT pour les tables déchargées
    --
    
    --
    -- AUTO_INCREMENT pour la table `Enonce`
    --
    ALTER TABLE `Enonce`
      MODIFY `enonceID` int(11) NOT NULL AUTO_INCREMENT;
    
    --
    -- AUTO_INCREMENT pour la table `Exercice`
    --
    ALTER TABLE `Exercice`
      MODIFY `exerciceID` int(11) NOT NULL AUTO_INCREMENT;
    
    --
    -- AUTO_INCREMENT pour la table `Users`
    --
    ALTER TABLE `Users`
      MODIFY `userID` int(11) NOT NULL AUTO_INCREMENT;
    
    --
    -- Contraintes pour les tables déchargées
    --
    
    --
    -- Contraintes pour la table `EnonceStaff`
    --
    ALTER TABLE `EnonceStaff`
      ADD CONSTRAINT `EnonceStaff_ibfk_1` FOREIGN KEY (`enonceID`) REFERENCES `Enonce` (`enonceID`),
      ADD CONSTRAINT `EnonceStaff_ibfk_2` FOREIGN KEY (`userID`) REFERENCES `Users` (`userID`);
    
    --
    -- Contraintes pour la table `Exercice`
    --
    ALTER TABLE `Exercice`
      ADD CONSTRAINT `Exercice_ibfk_1` FOREIGN KEY (`exerciceEnonceID`) REFERENCES `Enonce` (`enonceID`);
    
    --
    -- Contraintes pour la table `ExerciceMembers`
    --
    ALTER TABLE `ExerciceMembers`
      ADD CONSTRAINT `ExerciceMembers_ibfk_1` FOREIGN KEY (`exerciceID`) REFERENCES `Exercice` (`exerciceID`),
      ADD CONSTRAINT `ExerciceMembers_ibfk_2` FOREIGN KEY (`userID`) REFERENCES `Users` (`userID`);
    
    --
    -- Contraintes pour la table `Results`
    --
    ALTER TABLE `Results`
      ADD CONSTRAINT `Results_ibfk_1` FOREIGN KEY (`resultExerciceID`) REFERENCES `Exercice` (`exerciceID`);
    COMMIT;