Fix migration generation.

This commit is contained in:
Buster "Silver Eagle" Neece 2022-05-29 20:08:39 -05:00
parent 87d74adbd3
commit d03a60258f
No known key found for this signature in database
GPG Key ID: F1D2E64A0005E80E
2 changed files with 8 additions and 9 deletions

View File

@ -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',

View File

@ -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(),
]
);