microweber-packages / microweber-db-migrator
Standalone Laravel database migrator and schema builder. Provides a custom migrator, table builder, and schema installer that can be reused across any Laravel application.
Package info
github.com/microweber-packages/microweber-db-migrator
pkg:composer/microweber-packages/microweber-db-migrator
Requires
- php: ^8.2
- illuminate/database: ^10.0|^11.0|^12.0|^13.0
- illuminate/events: ^10.0|^11.0|^12.0|^13.0
- illuminate/support: ^10.0|^11.0|^12.0|^13.0
- 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-migrator: *
This package is auto-updated.
Last update: 2026-11-03 17:06:25 UTC
README
Standalone Laravel package providing Microweber's resilient database migrator. Extracted from the CMS install system so it can be reused in any Laravel application.
Features
- MicroweberMigrator – a resilient migrator that wraps Laravel's
Migrator, auto-creates themigrationstable, and never throws on duplicate-migration errors (so re-running against a partially-migrated database is safe).
The service provider binds it to the container as mw_migrator.
The database installer orchestration lives in
microweber-packages/microweber-db-installer, and the array→table builder lives inmicroweber-packages/microweber-database(MicroweberPackages\Database\Utils::build_table). This package is the migrator only.
Installation
composer require microweber-packages/microweber-db-migrator
The package auto-discovers its service provider. If you need to register manually:
// config/app.php 'providers' => [ MicroweberPackages\DbMigrator\DbMigratorServiceProvider::class, ],
Quick Start
// Resolve the migrator (bound as `mw_migrator`) and run migrations: app('mw_migrator')->run(app('migrator')->paths());
License
MIT