Skip to content
This repository has been archived by the owner on Jan 25, 2023. It is now read-only.

Avoid the database driver to try to create the maintenance table at every request #59

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

SebastienTainon
Copy link

Currently, at every request on the application, the database driver tries to create the table maintenance :

CREATE TABLE IF NOT EXISTS %s (ttl %s DEFAULT NULL)\

This causes quite a lot of unnecessary requests to the database on a huge traffic infrastructure. I suggest to add an option to the configuration that basically says that the table is created, in which case we do not try to create it again. It can be used like this:

 driver:
      class: 'Lexik\Bundle\MaintenanceBundle\Drivers\DatabaseDriver'
      options: {table_created: true}

… does not try to create again the table at every request on the application
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant