25개 이상의 토픽을 선택하실 수 없습니다. Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
 
 
 

75 lines
2.7 KiB

  1. doctrine:
  2. dbal:
  3. default_connection: central
  4. connections:
  5. central:
  6. url: '%env(resolve:DATABASE_URL)%'
  7. profiling_collect_backtrace: '%kernel.debug%'
  8. tenant:
  9. # Basis-URL zeigt auf central – TenantConnectionMiddleware
  10. # ersetzt dbname zur Laufzeit mit 'db_{slug}'
  11. url: '%env(resolve:DATABASE_URL)%'
  12. profiling_collect_backtrace: '%kernel.debug%'
  13. # Middleware wird via Service-Tag registriert (services.yaml)
  14. orm:
  15. default_entity_manager: central
  16. entity_managers:
  17. central:
  18. connection: central
  19. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  20. mappings:
  21. Central:
  22. is_bundle: false
  23. type: attribute
  24. dir: '%kernel.project_dir%/src/Entity/Central'
  25. prefix: 'App\Entity\Central'
  26. alias: Central
  27. tenant:
  28. connection: tenant
  29. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  30. mappings:
  31. Tenant:
  32. is_bundle: false
  33. type: attribute
  34. dir: '%kernel.project_dir%/src/Entity/Tenant'
  35. prefix: 'App\Entity\Tenant'
  36. alias: Tenant
  37. when@test:
  38. doctrine:
  39. dbal:
  40. connections:
  41. central:
  42. url: '%env(resolve:DATABASE_URL)%'
  43. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  44. tenant:
  45. url: '%env(resolve:DATABASE_URL)%'
  46. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  47. when@prod:
  48. doctrine:
  49. orm:
  50. entity_managers:
  51. central:
  52. query_cache_driver:
  53. type: pool
  54. pool: doctrine.system_cache_pool
  55. result_cache_driver:
  56. type: pool
  57. pool: doctrine.result_cache_pool
  58. tenant:
  59. query_cache_driver:
  60. type: pool
  61. pool: doctrine.system_cache_pool
  62. result_cache_driver:
  63. type: pool
  64. pool: doctrine.result_cache_pool
  65. framework:
  66. cache:
  67. pools:
  68. doctrine.result_cache_pool:
  69. adapter: cache.app
  70. doctrine.system_cache_pool:
  71. adapter: cache.system