netlogix/migrations-jobqueue
最新稳定版本:2.0.1
Composer 安装命令:
composer require netlogix/migrations-jobqueue
包简介
Run netlogix/migrations asynchronously using flowpack/jobqueue
README 文档
README
About Netlogix Migrations
This package provides the ability to run migrations of the netlogix/migrations package (Netlogix.Migrations) asynchronously.
Installation
composer require netlogix/migrations-jobqueue
Configuration
To run a migration asynchronously, the Queue to be used needs to be defined:
Netlogix: Migrations: JobQueue: queueName: 'nlx-migrations'
The queue (In this example nlx-migrations) must be configured in Flowpack.JobQueue.Common (Check Github for more info)!
Usage
Simply use the AsyncMigration interface in your migration:
<?php declare(strict_types=1); namespace Netlogix\Migrations\Persistence\Migrations; use Netlogix\Migrations\JobQueue\Domain\Model\AsyncMigration; class Version20210114172342 implements AsyncMigration { public function up(): void { // ... } public function down(): void { // ... } }
When ./flow migrations:migrate is run, the migration will instantly be marked as executed and an asynchronous job will be queued to the configured jobqueue.
统计信息
- 总下载量: 55.63k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2021-01-26