137 lines
3.4 KiB
SQL
Executable File
137 lines
3.4 KiB
SQL
Executable File
-- phpMyAdmin SQL Dump
|
|
-- version 4.7.0
|
|
-- https://www.phpmyadmin.net/
|
|
--
|
|
-- Host: localhost
|
|
-- Generation Time: May 29, 2017 at 06:15 AM
|
|
-- Server version: 10.1.22-MariaDB
|
|
-- PHP Version: 7.1.4
|
|
|
|
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 */;
|
|
|
|
--
|
|
-- Database: `securite`
|
|
--
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `article`
|
|
--
|
|
|
|
CREATE TABLE `article` (
|
|
`id` int(11) NOT NULL,
|
|
`title` text COLLATE utf8mb4_unicode_ci,
|
|
`closed` decimal(10,0) DEFAULT NULL,
|
|
`content` text COLLATE utf8mb4_unicode_ci
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
--
|
|
-- Dumping data for table `article`
|
|
--
|
|
|
|
INSERT INTO `article` (`id`, `title`, `closed`, `content`) VALUES
|
|
(1, 'Premier', '1', 'Premier message, sans commentaire.'),
|
|
(2, 'Second', '0', 'Second message, avec des commentaires.');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `comment`
|
|
--
|
|
|
|
CREATE TABLE `comment` (
|
|
`id` int(11) NOT NULL,
|
|
`id_article` decimal(10,0) DEFAULT NULL,
|
|
`title` text COLLATE utf8mb4_unicode_ci,
|
|
`id_user` decimal(10,0) DEFAULT NULL,
|
|
`content` text COLLATE utf8mb4_unicode_ci
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
--
|
|
-- Dumping data for table `comment`
|
|
--
|
|
|
|
INSERT INTO `comment` (`id`, `id_article`, `title`, `id_user`, `content`) VALUES
|
|
(1, '2', 'Super', '2', 'Article très intéressant !'),
|
|
(2, '2', 'Un commentaire', '1', 'Pour tester !'),
|
|
(3, '2', 'Un deuxième commentaire', '1', 'ça casse pas trois pattes à un canard !');
|
|
|
|
-- --------------------------------------------------------
|
|
|
|
--
|
|
-- Table structure for table `user`
|
|
--
|
|
|
|
CREATE TABLE `user` (
|
|
`id` int(11) NOT NULL,
|
|
`login` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`name` varchar(60) COLLATE utf8mb4_unicode_ci DEFAULT NULL,
|
|
`password` text COLLATE utf8mb4_unicode_ci,
|
|
`url` text COLLATE utf8mb4_unicode_ci
|
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_unicode_ci;
|
|
|
|
--
|
|
-- Dumping data for table `user`
|
|
--
|
|
|
|
INSERT INTO `user` (`id`, `login`, `name`, `password`, `url`) VALUES
|
|
(1, 'francois', 'François', 'mdp', 'http://fr.php.net'),
|
|
(2, 'denis', 'Denis', 'moi', 'http://lemonde.fr');
|
|
|
|
--
|
|
-- Indexes for dumped tables
|
|
--
|
|
|
|
--
|
|
-- Indexes for table `article`
|
|
--
|
|
ALTER TABLE `article`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `comment`
|
|
--
|
|
ALTER TABLE `comment`
|
|
ADD PRIMARY KEY (`id`);
|
|
|
|
--
|
|
-- Indexes for table `user`
|
|
--
|
|
ALTER TABLE `user`
|
|
ADD PRIMARY KEY (`id`),
|
|
ADD UNIQUE KEY `login` (`login`);
|
|
|
|
--
|
|
-- AUTO_INCREMENT for dumped tables
|
|
--
|
|
|
|
--
|
|
-- AUTO_INCREMENT for table `article`
|
|
--
|
|
ALTER TABLE `article`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=3;
|
|
--
|
|
-- AUTO_INCREMENT for table `comment`
|
|
--
|
|
ALTER TABLE `comment`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=23;
|
|
--
|
|
-- AUTO_INCREMENT for table `user`
|
|
--
|
|
ALTER TABLE `user`
|
|
MODIFY `id` int(11) NOT NULL AUTO_INCREMENT, AUTO_INCREMENT=6;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 */;
|