davedevelopment/phpmig
Phpmig is a lightweight, framework-agnostic PHP 5.3+ database migration tool. Run, generate, and track migrations from the CLI using a simple bootstrap container (e.g., Pimple) to wire your DB and services—Doctrine optional.
migrations) or naming conventions.phpmig to Laravel’s migration runner.phpmig addresses better?phpmig) introduce complexity in CI/CD or deployment?laravel/migrations).phpmig handle only new migrations, or replace existing ones?phpmig for non-Laravel PHP apps; keep Laravel migrations separate.phpmig service provider) to integrate with Laravel’s Schema facade.// app/Providers/PHPMigServiceProvider.php
use DaveDevelopment\PHPMig\PHPMig;
class PHPMigServiceProvider extends ServiceProvider {
public function register() {
$this->app->singleton('phpmig', function () {
return new PHPMig(base_path('database/phpmig'));
});
}
}
Migrator to support phpmig files.phpmig for legacy data migrations.phpmig scripts before/after Laravel migrations.phpmig commands to Artisan (e.g., php artisan phpmig:migrate).phpmig_migrations).create_function).Migrating, Migrated).phpmig in isolation with a subset of migrations.phpmig for legacy migrations while phasing out old systems.composer.json to avoid unexpected breaks.phinx, doctrine/migrations).phpmig itself, but:
phpmig migrations).| Failure Scenario | Impact | Mitigation |
|---|---|---|
| Migration script error | Partial schema/data corruption | Use transactions; test in staging first. |
| Rollback failure | Inconsistent database state | Manual recovery scripts; backups. |
| PHP version incompatibility | Migration runner crashes | Pin PHP version; test upgrades early. |
Laravel/phpmig conflict |
Migration table corruption | Isolate migration tables or use prefixes. |
| Abandoned package | Security vulnerabilities | Fork or replace with maintained alternative. |
| Custom integration bugs | Unpredictable behavior | Automated testing; code reviews. |
phpmig syntax.How can I help you explore Laravel packages today?