Advertisement
Guest User

Untitled

a guest
Jan 19th, 2019
129
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 5.69 KB | None | 0 0
  1. -- phpMyAdmin SQL Dump
  2. -- version 4.6.4
  3. -- https://www.phpmyadmin.net/
  4. --
  5. -- Client : 127.0.0.1
  6. -- Généré le : Mer 05 Juillet 2017 à 22:12
  7. -- Version du serveur : 5.7.14
  8. -- Version de PHP : 5.6.25
  9.  
  10. SET SQL_MODE = "NO_AUTO_VALUE_ON_ZERO";
  11. SET time_zone = "+00:00";
  12.  
  13.  
  14. /*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
  15. /*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
  16. /*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
  17. /*!40101 SET NAMES utf8mb4 */;
  18.  
  19. --
  20. -- Base de données : `forum`
  21. --
  22.  
  23. -- --------------------------------------------------------
  24.  
  25. --
  26. -- Structure de la table `categories`
  27. --
  28.  
  29. CREATE TABLE `categories` (
  30. `Cat_id` int(11) NOT NULL,
  31. `Cat_titre` text NOT NULL,
  32. `Cat_description` text NOT NULL,
  33. `Cat_fk_categories` int(11) DEFAULT NULL
  34. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  35.  
  36. --
  37. -- Contenu de la table `categories`
  38. --
  39.  
  40. INSERT INTO `categories` (`Cat_id`, `Cat_titre`, `Cat_description`, `Cat_fk_categories`) VALUES
  41. (1, 'JAVA', 'Ensemble des Catégories et Sujets traitants de Java', NULL),
  42. (2, 'PHP', 'Ensemble des Categories et Sujets traitant de PHP', NULL),
  43. (3, 'Java EE', 'Sujet et categories traitant de Java EE', 1),
  44. (4, 'Java SE', 'Sujets et catégories traitants de java SE', 1),
  45. (5, 'Java Util', 'java utils', 3),
  46. (6, 'PHP 1', 'Le vieux php !', 2),
  47. (7, 'Python', 'Categories et sujets traitants de python', NULL),
  48. (8, 'SQL', 'Catégories et Sujets traitants de SQL', NULL),
  49. (9, 'PHP2', 'Catégories et Sujets traitants de PHP2', 2),
  50. (10, 'PYTHON1', 'Catégories et Sujets traitants de Python1', 7),
  51. (11, 'Python2', 'Catégories et Sujets traitants de Python2', 7),
  52. (12, 'SQL2', 'Catégories et Sujets traitants de SQL2', 8),
  53. (13, 'No-SQL', 'Catégories et Sujets traitants de No-SQL', 8),
  54. (14, 'My SQL', 'Catégories et Sujets traitants de My SQL', 12);
  55.  
  56. -- --------------------------------------------------------
  57.  
  58. --
  59. -- Structure de la table `messages`
  60. --
  61.  
  62. CREATE TABLE `messages` (
  63. `Mess_id` int(11) NOT NULL,
  64. `Mess_FK_Uti_id` int(11) NOT NULL,
  65. `Mess_FK_Suj_id` int(11) NOT NULL,
  66. `Mess_date` timestamp NOT NULL,
  67. `Mess_contenu` text NOT NULL
  68. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  69.  
  70. --
  71. -- Contenu de la table `messages`
  72. --
  73.  
  74. INSERT INTO `messages` (`Mess_id`, `Mess_FK_Uti_id`, `Mess_FK_Suj_id`, `Mess_date`, `Mess_contenu`) VALUES
  75. (1, 1, 1, '2017-07-05 18:55:56', 'Java c\'est super cool !'),
  76. (2, 1, 2, '2017-07-05 20:08:29', 'Trop nuuuuul!'),
  77. (3, 2, 3, '2017-07-05 21:46:25', 'oh oh !'),
  78. (4, 3, 3, '2017-07-05 21:58:10', 'What ?'),
  79. (5, 1, 3, '2017-07-05 22:05:08', ':/ ?');
  80.  
  81. -- --------------------------------------------------------
  82.  
  83. --
  84. -- Structure de la table `sujets`
  85. --
  86.  
  87. CREATE TABLE `sujets` (
  88. `Suj_id` int(11) NOT NULL,
  89. `Suj_titre` text NOT NULL,
  90. `Suj_description` text NOT NULL,
  91. `Suj_FK_Cat_id` bigint(20) NOT NULL,
  92. `Suj_FK_Uti_id` int(11) NOT NULL,
  93. `Suj_date` timestamp NOT NULL
  94. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  95.  
  96. --
  97. -- Contenu de la table `sujets`
  98. --
  99.  
  100. INSERT INTO `sujets` (`Suj_id`, `Suj_titre`, `Suj_description`, `Suj_FK_Cat_id`, `Suj_FK_Uti_id`, `Suj_date`) VALUES
  101. (1, 'Java c\'est bien !', 'Waoouuuwwww', 1, 1, '2017-07-05 18:50:09'),
  102. (2, 'Php c\'est pas super', 'pas super du tout', 2, 1, '2017-07-05 18:58:19'),
  103. (3, 'Sujet Java SE', 'Bla bla bla', 3, 3, '2017-07-05 21:45:24');
  104.  
  105. -- --------------------------------------------------------
  106.  
  107. --
  108. -- Structure de la table `utilisateurs`
  109. --
  110.  
  111. CREATE TABLE `utilisateurs` (
  112. `Uti_id` int(11) NOT NULL,
  113. `Uti_nom` varchar(50) NOT NULL,
  114. `Uti_prenom` varchar(50) NOT NULL,
  115. `Uti_mail` varchar(50) NOT NULL,
  116. `Uti_pseudo` varchar(30) NOT NULL,
  117. `Uti_admin` tinyint(1) DEFAULT NULL,
  118. `Uti_pwd` varchar(15) DEFAULT NULL,
  119. `Uti_datecreation` timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP
  120. ) ENGINE=MyISAM DEFAULT CHARSET=latin1;
  121.  
  122. --
  123. -- Contenu de la table `utilisateurs`
  124. --
  125.  
  126. INSERT INTO `utilisateurs` (`Uti_id`, `Uti_nom`, `Uti_prenom`, `Uti_mail`, `Uti_pseudo`, `Uti_admin`, `Uti_pwd`, `Uti_datecreation`) VALUES
  127. (1, 'LEONARD', 'Benjamin', 'benja.leonard.bl@gmail.com', 'Zead', 1, 'testforum', '2017-07-05 18:22:11'),
  128. (2, 'BAPS', 'Fabien', 'Baps.fabien@gmail.com', 'Bapsfan', NULL, '12345', '2017-07-05 21:30:52'),
  129. (3, 'SIQUET', 'Dylan', 'Dylan.siquet@gmail.com', 'Siq', NULL, '12345', '2017-07-05 21:32:39');
  130.  
  131. --
  132. -- Index pour les tables exportées
  133. --
  134.  
  135. --
  136. -- Index pour la table `categories`
  137. --
  138. ALTER TABLE `categories`
  139. ADD PRIMARY KEY (`Cat_id`),
  140. ADD KEY `Cat_FK_Cat_id` (`Cat_fk_categories`);
  141.  
  142. --
  143. -- Index pour la table `messages`
  144. --
  145. ALTER TABLE `messages`
  146. ADD PRIMARY KEY (`Mess_id`);
  147.  
  148. --
  149. -- Index pour la table `sujets`
  150. --
  151. ALTER TABLE `sujets`
  152. ADD PRIMARY KEY (`Suj_id`),
  153. ADD UNIQUE KEY `Suj_FK_Cat_id` (`Suj_FK_Cat_id`);
  154.  
  155. --
  156. -- Index pour la table `utilisateurs`
  157. --
  158. ALTER TABLE `utilisateurs`
  159. ADD PRIMARY KEY (`Uti_id`);
  160.  
  161. --
  162. -- AUTO_INCREMENT pour les tables exportées
  163. --
  164.  
  165. --
  166. -- AUTO_INCREMENT pour la table `categories`
  167. --
  168. ALTER TABLE `categories`
  169. MODIFY `Cat_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=15;
  170. --
  171. -- AUTO_INCREMENT pour la table `messages`
  172. --
  173. ALTER TABLE `messages`
  174. MODIFY `Mess_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;
  175. --
  176. -- AUTO_INCREMENT pour la table `sujets`
  177. --
  178. ALTER TABLE `sujets`
  179. MODIFY `Suj_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  180. --
  181. -- AUTO_INCREMENT pour la table `utilisateurs`
  182. --
  183. ALTER TABLE `utilisateurs`
  184. MODIFY `Uti_id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=4;
  185. /*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
  186. /*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
  187. /*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement