Code Coverage |
||||||||||
Classes and Traits |
Functions and Methods |
Lines |
||||||||
Total | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
CRAP | |
0.00% |
0 / 11 |
MigrateUp | |
0.00% |
0 / 1 |
|
0.00% |
0 / 2 |
12 | |
0.00% |
0 / 11 |
prepare | |
0.00% |
0 / 1 |
2 | |
0.00% |
0 / 4 |
|||
migrate | |
0.00% |
0 / 1 |
6 | |
0.00% |
0 / 7 |
<?php namespace App\Commands; | |
use Framework\CLI\CLI; | |
use Framework\Database\Extra\Migrator; | |
class MigrateUp extends AbstractMigration | |
{ | |
protected string $name = 'migrate:up'; | |
protected string $description = 'Run migrations up.'; | |
protected string $usage = 'migrate:up'; | |
protected function prepare() | |
{ | |
parent::prepare(); | |
$this->description = $this->console->getLanguage()->render('migrations', 'runUp'); | |
} | |
protected function migrate(Migrator $migrator) : void | |
{ | |
foreach ($migrator->migrateUp() as $version) { | |
CLI::write( | |
$this->console->getLanguage()->render('migrations', 'migratedToVersion', [$version]) | |
); | |
} | |
} | |
} |