CREATE DATABASE IF NOT EXISTS cms_simpli CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;

USE cms_simpli;

CREATE TABLE utilisateur (
id INT AUTO_INCREMENT PRIMARY KEY,
login VARCHAR(50) UNIQUE NOT NULL,
password VARCHAR(255) NOT NULL
);


CREATE TABLE articles (
id INT AUTO_INCREMENT PRIMARY KEY,
titre VARCHAR(255) NOT NULL,
contenu TEXT NOT NULL,
date_creation DATETIME DEFAULT CURRENT_TIMESTAMP
);


INSERT INTO utilisateur (login, password) VALUES ('admin', '$2y$10$OVqu798zF7FF36HER0nZ9uOJ5tuuTR.kwPK2GTiqlPPYzR2szGzB6');