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