-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Support app level migration scaffolding
- Loading branch information
Showing
10 changed files
with
67 additions
and
20 deletions.
There are no files selected for viewing
2 changes: 0 additions & 2 deletions
2
app/modules/Honeybee_Core/impl/Fixture/Generate/GenerateAction.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 0 additions & 2 deletions
2
app/modules/Honeybee_Core/impl/Fixture/Import/ImportAction.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
48 changes: 48 additions & 0 deletions
48
app/modules/Honeybee_Core/impl/Migrate/Create/RabbitMqMigration.tpl.twig
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,48 @@ | ||
<?php | ||
namespace {{ vendor_prefix }}\{{ package_prefix }}\Migration\RabbitMq; | ||
use Honeybee\Infrastructure\Migration\MigrationInterface; | ||
use Honeybee\Infrastructure\Migration\MigrationTargetInterface; | ||
use Honeybee\Infrastructure\Migration\RabbitMqMigration; | ||
class Migration_{{ timestamp }}_{{ name }} extends RabbitMqMigration | ||
{ | ||
public function getDescription($direction = MigrationInterface::MIGRATE_UP) | ||
{ | ||
if ($direction === MigrationInterface::MIGRATE_UP) { | ||
return '{{ description }}'; | ||
} | ||
return 'Reversal of {{ description }}'; | ||
} | ||
public function isReversible() | ||
{ | ||
return true; | ||
} | ||
public function up(MigrationTargetInterface $migration_target) | ||
{ | ||
/* | ||
* Create a version list and domain events pipeline if this is the initial migration | ||
* | ||
* $this->createVersionList($migration_target, '{{ project_prefix }}.domain.version_list'); | ||
* $this->createExchangePipeline($migration_target, '{{ project_prefix }}.domain.events'); | ||
*/ | ||
/* | ||
* Create a queue and register on an exchange. Event bus events for an async channel will be sent | ||
* as messages routed to the given queue. | ||
* | ||
* Add a configuration in jobs.xml and register the job to an event handler, then run a worker | ||
* to process the messages according to configured retry/fail strategies. | ||
* | ||
* $this->createQueue($migration_target, '{{ project_prefix }}.domain.events', 'my.queue', 'my_routing_key'); | ||
*/ | ||
} | ||
public function down(MigrationTargetInterface $migration_target) | ||
{ | ||
// @todo implement | ||
} | ||
} |
2 changes: 0 additions & 2 deletions
2
app/modules/Honeybee_Core/impl/Util/BuildConfig/BuildConfigAction.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
app/modules/Honeybee_Core/impl/Util/ReplayEvents/ReplayEventsAction.class.php
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters