EtonDigital / EDBlogBundle

EDBlogBundle is extensive and user friendly blog bundle for Symfony2. It provides a lot of interesting features that makes a serious bloging platform from your Symfony2 application. It is very intuitive and flexible, you can easily fit it to your own needs.
MIT License
35 stars 20 forks source link

Postgres support? #37

Open kershner opened 6 years ago

kershner commented 6 years ago

Hey there!

Is this bundle incompatible with Postgres? I'm all the way through the installation process but Symfony is throwing an error:

An exception has been thrown during the rendering of a template ("An exception occurred while executing 'SELECT YEAR(published_at) as year, MONTH(published_at) as month, COUNT(*) as num
FROM blog_article
WHERE status = 'published'
GROUP BY YEAR(published_at), MONTH(published_at)
ORDER BY year DESC, month DESC':

SQLSTATE[42883]: Undefined function: 7 ERROR: function year(timestamp without time zone) does not exist
LINE 1: SELECT YEAR(published_at) as year, MONTH(published_at) as mo...
^
HINT: No function matches the given name and argument types. You might need to add explicit type casts.").

I don't think year(timestamp) is a function in Postgres. So was this thing built exclusively for MySQL? Or is there a configuration setting I'm missing somewhere? Thank you!

EDIT Narrowed it down to this model repository so far, which does indeed seem to be using MySQL-exclusive syntax.

Not a big deal to simply override the method in my own repository, but you guys might wanna give a heads up about it in the docs.