Skip to content

v1.2.2 – Multi-Database Support & Stability Improvements

Choose a tag to compare

@bertugfahriozer bertugfahriozer released this 25 Jul 07:59
· 4 commits to master since this release

This release introduces support for multiple database connections and includes important improvements for greater flexibility and better stability in CodeIgniter 4 projects using ci4commonmodel.

🚀 New Features:

  • ✅ Multi-Database Group Support:

You can now initialize CommonModel with a custom database connection group (e.g., 'secondDB') to support dynamic multi-database architecture.

  • 🔧 Constructor Enhancement:

CommonModel’s constructor now accepts a $group parameter, allowing developers to switch between defined database groups in the .env or Config\Database.php.

🛠 Improvements:

  • Better handling of dynamic connections using Database::connect().
  • Cleaned up internal handling of $dbGroup for improved clarity and performance.

📚 Upgrade Notes:

If you use multiple database connections, be sure to define custom database groups in app/Config/Database.php as .env alone is not sufficient.