#
# Persistence configuration for the Flow Framework
#

Neos:
  Flow:
    persistence:
      # Options for the default Doctrine persistence
      backendOptions:
        driver: 'pdo_mysql'
        host: NULL
        dbname: NULL
        user: NULL
        password: NULL
        charset: 'utf8mb4'
        defaultTableOptions:
          charset: 'utf8mb4'
      # Doctrine DBAL result caching, see Flow documentation on persistence and
      # https://www.doctrine-project.org/projects/doctrine-dbal/en/2.13/reference/caching.html
      cacheAllQueryResults: false

      doctrine:
        # By default Doctrine proxy compilation is done in the Flow bootstrap
        enable: true
        sqlLogger: NULL
        filters:
          Flow_Security_Entity_Filter: 'Neos\Flow\Security\Authorization\Privilege\Entity\Doctrine\SqlFilter'

        # DBAL custom mapping types can be registered here
        dbal:
          mappingTypes:
            'flow_json_array':
              dbType: 'flow_json_array'
              className: 'Neos\Flow\Persistence\Doctrine\DataTypes\JsonArrayType'

        # Doctrine ORM Lifecycle events and their subscribers and listeners.
        # See Flow manual, chapter "Persistence" for further information on how to subscribe to Doctrine events.
        eventSubscribers: []
        eventListeners:
          'Neos\Flow\Persistence\Doctrine\AllowedObjectsListener':
            events: ['onFlush']
            listener: 'Neos\Flow\Persistence\Doctrine\AllowedObjectsListener'
          'Neos\Flow\Persistence\Doctrine\ObjectValidationAndDeDuplicationListener':
            events: ['onFlush', 'prePersist']
            listener: 'Neos\Flow\Persistence\Doctrine\ObjectValidationAndDeDuplicationListener'

        # Doctrine ORM Second Level Cache configuration.
        # For further information, check the Flow manual, chapter "Persistence"  and
        # https://www.doctrine-project.org/projects/doctrine-orm/en/2.10/reference/second-level-cache.html
        #
        # Example:
        # secondLevelCache:
        #   enable: true
        #   defaultLifetime: 3600
        #   regions:
        #     'my_entity_region': 7200
        secondLevelCache: []

        # List of table name prefixes matched against in the doctrine service
        # to prevent creating corresponding migrations.
        #
        # Example:
        # ignoredTables:
        #   'autogenerated_.*': true
        #   'acme_package_.*': true
        #
        # (would skip tables starting with "autogenerated_" or "acme_package_" when calling doctrine:migrationgenerate)
        migrations:
          ignoredTables: []
