-- Database initialization script for Redirect Intelligence v2
-- This script runs when the PostgreSQL container starts

-- Enable necessary extensions
CREATE EXTENSION IF NOT EXISTS "uuid-ossp";
CREATE EXTENSION IF NOT EXISTS "citext";

-- Create database if it doesn't exist (handled by Docker environment)
-- The database 'redirect_intelligence' is created by Docker environment variables

-- Grant necessary permissions
GRANT ALL PRIVILEGES ON DATABASE redirect_intelligence TO postgres;
