-- Initialize CVE-SIGMA Database for CLI Application
-- This creates the basic database structure for migration and data processing

CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

-- Create database if not exists (handled by Docker environment variables)
-- The database 'cve_sigma_db' is created automatically by the postgres image

-- Grant necessary permissions
GRANT ALL PRIVILEGES ON DATABASE cve_sigma_db TO cve_user;

-- Create schema if needed (tables are created by SQLAlchemy models)
-- This file ensures the database is properly initialized for CLI operations