Você não pode selecionar mais de 25 tópicos Os tópicos devem começar com uma letra ou um número, podem incluir traços ('-') e podem ter até 35 caracteres.
 
 
 
 
 

76 linhas
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. # middlewares:
  14. # - App\Doctrine\TenantConnectionMiddleware
  15. orm:
  16. default_entity_manager: central
  17. entity_managers:
  18. central:
  19. connection: central
  20. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  21. mappings:
  22. Central:
  23. is_bundle: false
  24. type: attribute
  25. dir: '%kernel.project_dir%/src/Entity/Central'
  26. prefix: 'App\Entity\Central'
  27. alias: Central
  28. tenant:
  29. connection: tenant
  30. naming_strategy: doctrine.orm.naming_strategy.underscore_number_aware
  31. mappings:
  32. Tenant:
  33. is_bundle: false
  34. type: attribute
  35. dir: '%kernel.project_dir%/src/Entity/Tenant'
  36. prefix: 'App\Entity\Tenant'
  37. alias: Tenant
  38. when@test:
  39. doctrine:
  40. dbal:
  41. connections:
  42. central:
  43. url: '%env(resolve:DATABASE_URL)%'
  44. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  45. tenant:
  46. url: '%env(resolve:DATABASE_URL)%'
  47. dbname_suffix: '_test%env(default::TEST_TOKEN)%'
  48. when@prod:
  49. doctrine:
  50. orm:
  51. entity_managers:
  52. central:
  53. query_cache_driver:
  54. type: pool
  55. pool: doctrine.system_cache_pool
  56. result_cache_driver:
  57. type: pool
  58. pool: doctrine.result_cache_pool
  59. tenant:
  60. query_cache_driver:
  61. type: pool
  62. pool: doctrine.system_cache_pool
  63. result_cache_driver:
  64. type: pool
  65. pool: doctrine.result_cache_pool
  66. framework:
  67. cache:
  68. pools:
  69. doctrine.result_cache_pool:
  70. adapter: cache.app
  71. doctrine.system_cache_pool:
  72. adapter: cache.system