Skip to content

v2.10.2

Choose a tag to compare

@tommyknocker tommyknocker released this 18 Nov 14:37
· 199 commits to master since this release

Release v2.10.2

Release Date: November 18, 2025

🎉 Major Features

Database Dump and Restore

Complete database backup and restore functionality with cross-dialect support:

  • Full database or table-specific dumps
  • Schema-only and data-only modes
  • Automatic DROP TABLE IF EXISTS (configurable)
  • Restore from SQL dump files with confirmation prompts

Table Management

Comprehensive table operations via CLI:

  • Create, drop, rename, truncate tables
  • Column management (add, alter, drop)
  • Index management (list, add, drop)
  • Multiple output formats (table, JSON, YAML)

Database & User Management

Full database and user administration:

  • Database operations (create, drop, list, info)
  • User management with privilege grants/revokes
  • Cross-dialect support (MySQL, MariaDB, PostgreSQL, MSSQL)
  • Interactive prompts for better UX

✨ Enhancements

Query Command

  • explain - Show query execution plans
  • format - Pretty-print SQL queries
  • validate - Validate SQL syntax

Model Generator

  • --force option for overwriting without prompts
  • --namespace option for custom namespaces
  • Better connection handling

Migration Command

  • --dry-run and --pretend options
  • --force option to skip confirmations
  • Improved confirmation prompts

Global CLI Options

  • --help - Show help (global and per-command)
  • --connection=<name> - Select named connection
  • --config=<path> - Custom config file path
  • --env=<path> - Custom .env file path

🔧 Improvements

SQL Formatter

  • Enhanced tokenization and whitespace handling
  • Multi-word keyword recognition
  • Consistent keyword uppercasing
  • Better formatting with proper line breaks

Architecture

  • Dialect classes split into components (SqlFormatter, DmlBuilder, DdlBuilder)
  • Reorganized into subdirectories for better organization
  • Replaced magic strings with QueryConstants class

Error Handling

  • User-friendly error messages instead of fatal errors
  • Typo detection with helpful suggestions
  • Better exception handling throughout CLI

🐛 Bug Fixes

  • Fixed configuration loading order
  • Improved CI/CD environment variable support
  • Fixed MariaDB examples in GitHub Actions
  • Restored MariaDB LAG/LEAD default value handling
  • Fixed CLI prompts display timing
  • Improved table listing robustness

📊 Quality Metrics

  • Tests: 2390 tests, 8016 assertions
  • Coverage: Increased CLI integration test coverage
  • Code Quality: PHPStan level 8, PSR-12 compliant
  • Compatibility: 100% backward compatible

📚 Documentation

All new features are fully documented in:

  • CLI Tools documentation
  • README.md
  • Inline code documentation

Full Changelog: v2.10.1...v2.10.2