Search by

microweber-packages / microweber-db-installer

boksiora

Microweber database installer — orchestrates system schema creation, migration and seeding using the db-migrator (custom migrator) and the database table builder.

Package info

github.com/microweber-packages/microweber-db-installer

Homepage

pkg:composer/microweber-packages/microweber-db-installer

Statistics

Installs: 31

Dependents: 2

Suggesters: 0

Stars: 0

Open Issues: 0

v1.0.0 2026-11-03 16:15 UTC

This package is auto-updated.

Last update: 2026-11-03 17:06:21 UTC


README

The Microweber database installer, extracted from the CMS install system.

DbInstaller orchestrates first-install and self-heal of the system database:

  1. ensures the sessions and migrations tables exist,
  2. runs the custom migrator (app()->mw_migrator, provided by microweber-packages/microweber-db-migrator),
  3. builds each array-defined system table via the database table builder (MicroweberPackages\Database\Utils::build_table — the single source of truth for the array→table engine, from microweber-packages/microweber-database),
  4. seeds the system data.

Relationship to other packages

  • db-migrator — supplies the custom MicroweberMigrator (mw_migrator).
  • database — supplies Utils::build_table, the array→table engine.
  • The system schema definitions (MicroweberPackages\Install\Schema\*) live in the application and are consumed by the installer; they are intentionally not moved into a package (they are app-specific). The installer pulls the list from MicroweberPackages\Install\InstallSchemas::get(), so this package stays schema-agnostic (it returns no schemas when used standalone).

Usage

$installer = new \MicroweberPackages\DbInstaller\DbInstaller();
$installer->run();

The legacy \MicroweberPackages\Install\DbInstaller is kept as a @deprecated back-compat subclass of this class.