Fix migration generation.
This commit is contained in:
parent
87d74adbd3
commit
d03a60258f
|
@ -12,20 +12,19 @@ return function (CallableEventDispatcherInterface $dispatcher) {
|
|||
$console = $event->getConsole();
|
||||
$di = $event->getContainer();
|
||||
|
||||
// Doctrine ORM/DBAL
|
||||
Doctrine\ORM\Tools\Console\ConsoleRunner::addCommands($console);
|
||||
|
||||
// Add Doctrine Migrations
|
||||
/** @var Doctrine\ORM\EntityManagerInterface $em */
|
||||
$em = $di->get(Doctrine\ORM\EntityManagerInterface::class);
|
||||
|
||||
// Doctrine ORM/DBAL
|
||||
Doctrine\ORM\Tools\Console\ConsoleRunner::addCommands(
|
||||
$console,
|
||||
new Doctrine\ORM\Tools\Console\EntityManagerProvider\SingleManagerProvider($em)
|
||||
);
|
||||
|
||||
// Add Doctrine Migrations
|
||||
/** @var Environment $environment */
|
||||
$environment = $di->get(Environment::class);
|
||||
|
||||
$helper_set = $console->getHelperSet();
|
||||
$doctrine_helpers = Doctrine\ORM\Tools\Console\ConsoleRunner::createHelperSet($em);
|
||||
$helper_set->set($doctrine_helpers->get('em'), 'em');
|
||||
|
||||
$migrationConfigurations = [
|
||||
'migrations_paths' => [
|
||||
'App\Entity\Migration' => $environment->getBaseDirectory() . '/src/Entity/Migration',
|
||||
|
|
|
@ -91,7 +91,7 @@ return [
|
|||
// PDO::MYSQL_ATTR_INIT_COMMAND = 1002;
|
||||
1002 => 'SET NAMES utf8mb4 COLLATE utf8mb4_general_ci',
|
||||
],
|
||||
'platform' => new Doctrine\DBAL\Platforms\MariaDBPlatform(),
|
||||
'platform' => new Doctrine\DBAL\Platforms\MariaDb1027Platform(),
|
||||
]
|
||||
);
|
||||
|
||||
|
|
Loading…
Reference in New Issue