1 | <?php namespace Nwidart\LaravelBroadway\Console; |
||
6 | class CreateEventStoreCommand extends Command |
||
7 | { |
||
8 | protected $name = 'broadway:event-store:migrate'; |
||
9 | protected $description = 'This will create the events store table based on the name in the configuration'; |
||
10 | |||
11 | public function handle() |
||
12 | { |
||
13 | $table = $this->argument('table'); |
||
14 | $this->laravel->config['broadway.event-store-table'] = $table; |
||
15 | |||
16 | $migrations = app('migration.repository'); |
||
17 | $migrations->createRepository(); |
||
18 | |||
19 | $migrator = app('migrator'); |
||
20 | $migrator->run(__DIR__ . '/../../migrations'); |
||
21 | |||
22 | $this->info("Table [$table] created!"); |
||
23 | } |
||
24 | |||
25 | protected function getArguments() |
||
31 | } |
||
32 |