This repository has been archived on 2025-04-11. You can view files and clone it, but cannot push or open issues or pull requests.
bee-backend-ARCHIVED/src/DataDomain/Business/config/doctrine.php
2024-08-24 20:33:05 +00:00

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',
],
],
];