#!/bin/bash
# Combined database setup script

SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"

echo "=== Setting up Makima Database ==="
echo ""

# Start PostgreSQL
echo "Step 1: Starting PostgreSQL..."
bash "${SCRIPT_DIR}/start-postgres.sh"
echo ""

# Wait a moment for full initialization
sleep 2

# Run migrations
echo "Step 2: Running migrations..."
bash "${SCRIPT_DIR}/run-migrations.sh"
echo ""

echo "=== Database setup complete! ==="
