mirror of
https://github.com/shlinkio/shlink.git
synced 2026-03-08 00:03:12 +08:00
Updated CreateDatabaseCommand to create the empty database if it does not exist
This commit is contained in:
17
module/Common/src/Doctrine/ConnectionFactory.php
Normal file
17
module/Common/src/Doctrine/ConnectionFactory.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
declare(strict_types=1);
|
||||
|
||||
namespace Shlinkio\Shlink\Common\Doctrine;
|
||||
|
||||
use Doctrine\DBAL\Connection;
|
||||
use Doctrine\ORM\EntityManager;
|
||||
use Psr\Container\ContainerInterface;
|
||||
|
||||
class ConnectionFactory
|
||||
{
|
||||
public function __invoke(ContainerInterface $container): Connection
|
||||
{
|
||||
$em = $container->get(EntityManager::class);
|
||||
return $em->getConnection();
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user