Use abstract class
This commit is contained in:
@ -7,16 +7,24 @@ use PDOException;
|
||||
use Psr\Log\LoggerInterface;
|
||||
use Symfony\Component\Console\Style\StyleInterface;
|
||||
use ProVM\Concept;
|
||||
use ProVM\Enforce;
|
||||
use ProVM\Repository;
|
||||
|
||||
class Migration
|
||||
class Migration extends Enforce\Generator
|
||||
{
|
||||
public function __construct(
|
||||
protected Concept\Database\Connection $connection, protected Concept\Database $database,
|
||||
protected Concept\Database $database,
|
||||
protected Concept\Database\Connection $connection,
|
||||
protected Concept\Database\Query\Builder $queryBuilder,
|
||||
public Repository\Table $tableRepository, protected LoggerInterface $logger,
|
||||
protected DateTimeInterface $startDate, protected string $databaseName,
|
||||
protected string $migrationsPath, protected array $skips) {}
|
||||
public Repository\Table $tableRepository,
|
||||
LoggerInterface $logger,
|
||||
protected DateTimeInterface $startDate,
|
||||
protected string $databaseName,
|
||||
protected string $migrationsPath,
|
||||
protected array $skips)
|
||||
{
|
||||
parent::__construct($logger);
|
||||
}
|
||||
|
||||
public function generate(StyleInterface $io, bool $dryRun = false): void
|
||||
{
|
||||
@ -121,11 +129,4 @@ use Phinx\Db\Adapter\MysqlAdapter;
|
||||
$time->format('Y-m-d H:i:s')
|
||||
]);
|
||||
}
|
||||
protected function log(string $message, bool $output = false, ?StyleInterface $io = null): void
|
||||
{
|
||||
$this->logger->info($message);
|
||||
if ($output) {
|
||||
$io->note($message);
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user