andreo/eventsauce-migration-generator
Symfony Console command that generates Doctrine Migrations for EventSauce message storage per aggregate. Configure Doctrine Migrations, then run a single command with a table prefix, selectable schemas (event/outbox/snapshot), UUID type, and optional table-name suffixes.
Command to generate doctrine migrations per aggregate
composer require andreo/eventsauce-migration-generator
In the first step, configure the doctrine migrations package
use Andreo\EventSauce\Doctrine\Migration\Command\GenerateDoctrineMigrationForEventSauceCommand;
new GenerateDoctrineMigrationForEventSauceCommand(
dependencyFactory: $dependencyFactory, // instance of Doctrine\Migrations\DependencyFactory
);
use Andreo\EventSauce\Doctrine\Migration\Command\GenerateDoctrineMigrationForEventSauceCommand;
use Andreo\EventSauce\Doctrine\Migration\Schema\TableNameSuffix;
new GenerateDoctrineMigrationForEventSauceCommand(
dependencyFactory: $dependencyFactory,
tableNameSuffix: new TableNameSuffix(event: 'message_store')
);
andreo:eventsauce:doctrine-migrations:generate
prefix table name
Generate migration with foo prefix
php bin/console andreo:eventsauce:doctrine-migrations:generate foo
--schema=all
Generate migration for given schemas
php bin/console andreo:eventsauce:doctrine-migrations:generate foo --schema=event --schema=snapshot
--uuid-type=binary
How can I help you explore Laravel packages today?