@@ -76,7 +76,7 @@ discard block |
||
| 76 | 76 | $this->setName('migration:exec') |
| 77 | 77 | ->setDescription('Execute the migration up/down for one version'); |
| 78 | 78 | |
| 79 | - $this->addArgument('type', 'type of migration [up|down]', 'up', true, true, false, function ($val) { |
|
| 79 | + $this->addArgument('type', 'type of migration [up|down]', 'up', true, true, false, function($val) { |
|
| 80 | 80 | if (!in_array($val, ['up', 'down'])) { |
| 81 | 81 | throw new RuntimeException(sprintf( |
| 82 | 82 | 'Invalid argument type [%s], must be one of [up, down]', |
@@ -118,7 +118,7 @@ discard block |
||
| 118 | 118 | } else { |
| 119 | 119 | $data = []; |
| 120 | 120 | foreach ($executed as $version => $entity) { |
| 121 | - $data[(string)$version] = $entity->description; |
|
| 121 | + $data[(string) $version] = $entity->description; |
|
| 122 | 122 | } |
| 123 | 123 | $version = $io->choice('Choose which version to rollback', $data); |
| 124 | 124 | $description = str_replace('_', ' ', $data[$version]); |
@@ -10,7 +10,7 @@ |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->create('roles', function (CreateTable $table) { |
|
| 13 | + $this->create('roles', function(CreateTable $table) { |
|
| 14 | 14 | $table->integer('id') |
| 15 | 15 | ->autoincrement() |
| 16 | 16 | ->primary(); |
@@ -10,7 +10,7 @@ discard block |
||
| 10 | 10 | public function up(): void |
| 11 | 11 | { |
| 12 | 12 | //Action when migrate up |
| 13 | - $this->alter('roles', function (AlterTable $table) { |
|
| 13 | + $this->alter('roles', function(AlterTable $table) { |
|
| 14 | 14 | $table->string('code')->notNull(); |
| 15 | 15 | $table->unique('code'); |
| 16 | 16 | }); |
@@ -19,7 +19,7 @@ discard block |
||
| 19 | 19 | public function down(): void |
| 20 | 20 | { |
| 21 | 21 | //Action when migrate down |
| 22 | - $this->alter('roles', function (AlterTable $table) { |
|
| 22 | + $this->alter('roles', function(AlterTable $table) { |
|
| 23 | 23 | $table->dropColumn('code'); |
| 24 | 24 | }); |
| 25 | 25 | } |