generated from flo/template-backend
55 lines
1.5 KiB
PHP
55 lines
1.5 KiB
PHP
<?php
|
|
|
|
use Doctrine\DBAL\Driver\PDO\MySQL\Driver;
|
|
use Doctrine\ORM\Mapping\Driver\AnnotationDriver;
|
|
use Doctrine\Persistence\Mapping\Driver\MappingDriverChain;
|
|
|
|
return [
|
|
'configuration' => [
|
|
'orm_template' => [
|
|
'second_level_cache' => [
|
|
'enabled' => false,
|
|
]
|
|
],
|
|
],
|
|
|
|
'driver' => [
|
|
'orm_template_annotation_driver' => [
|
|
'class' => AnnotationDriver::class,
|
|
'cache' => 'array',
|
|
'paths' => [
|
|
realpath(APP_ROOT . '/src/DataDomain/Business/Entity/')
|
|
],
|
|
],
|
|
|
|
'orm_template' => [
|
|
'class' => MappingDriverChain::class,
|
|
'drivers' => [
|
|
'Template\Data\Business\Entity' => 'orm_template_annotation_driver',
|
|
],
|
|
],
|
|
],
|
|
|
|
'connection' => [
|
|
'orm_template' => [
|
|
'driverClass' => Driver::class,
|
|
'params' => [
|
|
'driver' => $_ENV['DB_DRIVER'],
|
|
'host' => $_ENV['DB_HOST'],
|
|
'port' => $_ENV['DB_PORT'],
|
|
'user' => $_ENV['DB_USER'],
|
|
'password' => $_ENV['DB_PASSWORD'],
|
|
'dbname' => $_ENV['DB_NAME'],
|
|
],
|
|
],
|
|
],
|
|
|
|
'migrations_configuration' => [
|
|
'orm_template' => [
|
|
'directory' => 'data/migrations/business',
|
|
'name' => 'Doctrine Database Migrations for Template',
|
|
'namespace' => 'Template\Migrations\Template',
|
|
'table' => 'migrations',
|
|
],
|
|
],
|
|
]; |