netlogix / migrations-jobqueue
Run netlogix/migrations asynchronously using flowpack/jobqueue
Installs: 21 830
Dependents: 0
Suggesters: 0
Security: 0
Stars: 1
Watchers: 5
Forks: 0
Open Issues: 0
Type:neos-package
Requires
- php: ^7.4 || ^8.2
- flowpack/jobqueue-common: ^3.3
- neos/flow: ^7.3 || ^8.3
- netlogix/migrations: ^2.0
This package is auto-updated.
Last update: 2024-10-31 15:55:51 UTC
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.