quantick / deploy-migrations
Deploy migration commands
v1.0.13
2022-09-02 12:45 UTC
Requires
- php: ^7.2 || ^8.0
- ext-json: *
- illuminate/config: ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/console: ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/contracts: ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/database: ^6.0 || ^7.0 || ^v8.41.0 || ^9.0
- illuminate/filesystem: ^6.0 || ^7.0 || ^8.0 || ^9.0
- illuminate/support: ^6.0 || ^7.0 || ^8.0 || ^9.0
- symfony/finder: >=4.0
Requires (Dev)
- phpunit/phpunit: ^8.0
- vimeo/psalm: ^4.0@dev
This package is auto-updated.
Last update: 2025-03-29 01:10:45 UTC
README
Installation
You can install the package via composer:
composer require quantick/deploy-migrations
The package will automatically register itself.
You can publish config and migration with:
php artisan vendor:publish --provider="Quantick\DeployMigration\DeployMigrationServiceProvider"
In config/deploy-migration.php Ńonfigure the path to the directory with migrations. By default it will be deploy/migrations
How to use
- Generate migration via command:
php artisan make:deploy-migration
It will create migration class in your project.
- Next configure getCommands method:
<?php class Version20190211093348 extends \Quantick\DeployMigration\Lib\DeployMigration { public function getCommands(): array { return [ \App\Console\Commands\TestCommandWithArguments::class => ['arg' => 'value', '--option' => true], \App\Console\Commands\TestCommandWithoutArguments::class => [], function (SomeService $service) { return $service->doTheWork(); } ]; } }
- Run
php artisan deploy:migrate