Solved thread

This post is marked as solved. If you think the information contained on this thread must be part of the official documentation, please contribute submitting a pull request to its repository.

Is there a way to define the database schema?

Hi all,

Looking at my MySQL general log, I see these queries being run for every table Phalcon wants to access:

SELECT IF(COUNT(*)>0, 1 , 0) FROM INFORMATION_SCHEMA.TABLES WHERE TABLE_NAME='request' DESCRIBE request

While I think I understand the rationale behind why this happens (so the model can accurately reflect whatever is in the database), I find it wasteful to add a couple database queries to get something that I can put in a config file.

Is there any way to tell Phalcon what my database looks like so it doesn't have to go find out for itself every page load?

Thanks.

Thank you kindly sir.