Total Complexity | 5 |
Total Lines | 33 |
Duplicated Lines | 0 % |
Changes | 1 | ||
Bugs | 0 | Features | 0 |
1 | <?php declare(strict_types=1); |
||
14 | final class InitializeMessageExchange20190311143000 extends RabbitMq3Migration |
||
15 | { |
||
16 | public function getDescription(string $direction = self::MIGRATE_UP): string |
||
17 | { |
||
18 | return $direction === self::MIGRATE_UP |
||
19 | ? 'Create a RabbitMQ message exchange for the Lightningd-Adapter context.' |
||
20 | : 'Delete the RabbitMQ message message exchange for the Lightningd-Adapter context.'; |
||
21 | } |
||
22 | |||
23 | public function isReversible(): bool |
||
24 | { |
||
25 | return true; |
||
26 | } |
||
27 | |||
28 | protected function up(): void |
||
29 | { |
||
30 | $this->createMigrationList('lightningd.adapter.migration_list'); |
||
31 | $this->declareExchange( |
||
32 | 'lightningd.adapter.exchange', |
||
33 | 'x-delayed-message', |
||
34 | false, |
||
35 | true, |
||
36 | false, |
||
37 | false, |
||
38 | false, |
||
39 | ['x-delayed-type' => AMQPExchangeType::TOPIC] |
||
40 | ); |
||
41 | } |
||
42 | |||
43 | protected function down(): void |
||
47 | } |
||
48 | } |
||
49 |