Files
Projet-CMS/dump_cms_simplifie.sql
2025-11-02 19:42:11 +01:00

23 lines
754 B
SQL
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

CREATE DATABASE IF NOT EXISTS cms_simplifie;
USE cms_simplifie;
CREATE TABLE IF NOT EXISTS utilisateur (
id INT AUTO_INCREMENT PRIMARY KEY,
login VARCHAR(50) NOT NULL UNIQUE,
password VARCHAR(255) NOT NULL
);
INSERT INTO utilisateur (login, password)
VALUES ('admin', '$2y$10$e0NR8I0sXfJ3R6qU5K4J6.u4TbT2H8bX6u5pL1lN3eWz8yFzNfR9O');
CREATE TABLE IF NOT EXISTS articles (
id INT AUTO_INCREMENT PRIMARY KEY,
titre VARCHAR(255) NOT NULL,
contenu TEXT NOT NULL,
date_creation DATETIME NOT NULL
);
INSERT INTO articles (titre, contenu, date_creation)
VALUES
('Titre Exemple 1', 'Voici un texte dintroduction pour larticle 1...', NOW()),
('Titre Exemple 2', 'Voici un texte dintroduction pour larticle 2...', NOW());