
-- sql/schema.sql
CREATE DATABASE IF NOT EXISTS php_mvc_starter CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
USE php_mvc_starter;

CREATE TABLE IF NOT EXISTS users (
  id INT UNSIGNED AUTO_INCREMENT PRIMARY KEY,
  email VARCHAR(190) NOT NULL UNIQUE,
  password_hash VARCHAR(255) NOT NULL,
  role VARCHAR(50) NOT NULL DEFAULT 'admin',
  created_at TIMESTAMP DEFAULT CURRENT_TIMESTAMP
) ENGINE=InnoDB;

-- Usuario demo: admin@example.com / Admin123!
INSERT INTO users (email, password_hash, role) VALUES
('admin@example.com', '$2y$10$gFh1E8b2m7mQIL5rYy2qKeZ4HjJcWz7kWzvA6qL8C4f0U3I8k6m.a', 'admin');
