# =============================================================================
# DATABASE COMMANDS - Rustelo Framework
# =============================================================================
# Database operations for Rustelo-based projects

# Setup database (PostgreSQL or SQLite)
db-setup:
    @echo "🗄️ Setting up database..."
    ./scripts/databases/db-setup.sh

# Create database
db-create:
    @echo "🗄️ Creating database..."
    ./scripts/databases/db.sh create

# Run database migrations
db-migrate:
    @echo "🗄️ Running migrations..."
    ./scripts/databases/db-migrate.sh

# Check migration status
db-status:
    @echo "🗄️ Checking migration status..."
    ./scripts/databases/db.sh status

# Check database health
db-health:
    @echo "🗄️ Checking database health..."
    ./scripts/databases/db.sh health

# Reset database (WARNING: destroys data)
db-reset:
    @echo "⚠️ Resetting database..."
    ./scripts/databases/db.sh reset

# Backup database
db-backup:
    @echo "🗄️ Backing up database..."
    ./scripts/databases/db-backup.sh

# Monitor database performance
db-monitor:
    @echo "🗄️ Monitoring database..."
    ./scripts/databases/db-monitor.sh

# Show database size
db-size:
    @echo "🗄️ Database size information..."
    ./scripts/databases/db.sh size

# Optimize database
db-optimize:
    @echo "🗄️ Optimizing database..."
    ./scripts/databases/db.sh optimize