-- Database initialization script for Geekbrain Portfolio
-- Run this on the MariaDB server as root or a privileged user

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

-- Create application user (replace YOUR_PASSWORD with a strong password)
-- CREATE USER 'geekbrain_app'@'%' IDENTIFIED BY 'YOUR_PASSWORD';
-- GRANT SELECT, INSERT, UPDATE, DELETE ON geekbrain_portfolio.* TO 'geekbrain_app'@'%';
-- FLUSH PRIVILEGES;

-- The table will be created automatically by SQLAlchemy on first run (init_db)
