diff --git a/config/cli-config.php b/config/cli-config.php index d7f68f4..7385bed 100644 --- a/config/cli-config.php +++ b/config/cli-config.php @@ -7,11 +7,10 @@ use Doctrine\Migrations\DependencyFactory; use Doctrine\ORM\EntityManager; -$container = require 'config/container.php'; +$container = require __DIR__ . '/container.php'; -return DependencyFactory::fromEntityManager( - new PhpFile('config/migrations.php'), - new ExistingEntityManager( - $container->get(EntityManager::class) - ) -); +$config = new PhpFile('config/migrations.php'); + +$entityManager = $container->get(EntityManager::class); + +return DependencyFactory::fromEntityManager($config, new ExistingEntityManager($entityManager)); diff --git a/config/migrations.php b/config/migrations.php index 4b70195..d8911bd 100644 --- a/config/migrations.php +++ b/config/migrations.php @@ -3,16 +3,20 @@ declare(strict_types=1); return [ - 'table_storage' => [ + 'table_storage' => [ 'table_name' => 'migrations', 'version_column_name' => 'version', 'version_column_length' => 191, 'executed_at_column_name' => 'executed_at', 'execution_time_column_name' => 'execution_time', ], - 'migrations_paths' => [ + 'migrations_paths' => [ 'Admin\Migrations' => getcwd() . '/data/doctrine/migrations', ], - 'all_or_nothing' => true, - 'transactional' => true, + 'all_or_nothing' => true, + 'transactional' => true, + 'check_database_platform' => true, + 'organize_migrations' => 'none', + 'connection' => null, + 'em' => null, ];