-- Initial database setup for Crypto Trading Bot Dashboard
-- This script runs when PostgreSQL container starts for the first time

-- Create extensions
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";

-- Set timezone
SET timezone = 'UTC';

-- The database user is automatically created by Docker with the POSTGRES_USER and POSTGRES_PASSWORD
-- environment variables, so we don't need to create it here

-- Create initial comment
COMMENT ON DATABASE dashboard IS 'Crypto Trading Bot Dashboard Database';

-- Execute the clean schema file (without TimescaleDB hypertables for simpler setup)
\i /docker-entrypoint-initdb.d/schema_clean.sql 