uax / webman-migrate
Laravel-style migration commands for Webman projects
Requires
- php: >=8.1
- doctrine/inflector: ^2.0
- illuminate/database: ^12.0
- webman/console: ^2.2
- webman/database: ^2.1
README
Laravel-style migration commands for Webman projects.
中文说明请见 README.zh-CN.md.
What This Package Provides
The package provides commands from inside the package itself instead of copying command PHP files into the host project.
Available commands:
make:migrationmigratemigrate:rollbackmigrate:statusmigrate:publish
Installation
Install with Composer in a Webman project:
composer require uax/webman-migrate
After installation, Webman's plugin hook writes only the plugin config files needed to register commands:
config/plugin/uax/webman-migrate/app.phpconfig/plugin/uax/webman-migrate/command.php
The package does not automatically publish migration stubs or migration directories into the project.
Publish Project Resources
Publish resources only when the host project needs local stubs or the migrations directory:
php webman migrate:publish
This publishes:
databases/stubs/migration.stubdatabases/stubs/migration.create.stubdatabases/stubs/migration.update.stubdatabases/migrations/.gitkeep
To overwrite already published files:
php webman migrate:publish --force
Uninstall Behavior
When the package is removed through Composer:
composer remove uax/webman-migrate
The uninstall hook removes:
config/plugin/uax/webman-migrate/app.phpconfig/plugin/uax/webman-migrate/command.php- published files created by this package and still matching their recorded content
The uninstall hook does not blindly delete user-modified published files.