microweber-packages / microweber-db-installer
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
pkg:composer/microweber-packages/microweber-db-installer
v1.0.0
2026-11-03 16:15 UTC
Requires
- php: ^8.2
- illuminate/database: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- microweber-packages/microweber-database: *
- microweber-packages/microweber-package: *
- spatie/laravel-package-tools: ^1.16
Requires (Dev)
- orchestra/testbench: ^8.0|^9.0|^10.0
- phpunit/phpunit: ^10.0|^11.0
Suggests
None
Provides
None
Conflicts
None
Replaces
- microweber-packages/db-installer: *
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:
- ensures the
sessionsandmigrationstables exist, - runs the custom migrator (
app()->mw_migrator, provided bymicroweber-packages/microweber-db-migrator), - 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, frommicroweber-packages/microweber-database), - 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 fromMicroweberPackages\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.