doAuthPlugin
doAuthPlugin copied to clipboard
can not create table user in postgresql
In PostgreSQL database, the word "user" is a reserved one. See http://www.postgresql.org/docs/8.4/interactive/sql-keywords-appendix.html.
It's possible rename to something like doauth_user, so all tables can have a suffix?
Yep, sure. Need to think on that
Yeah, just what I thought :)
With tableName i can change the related name of the table.
You can turn on identifier quoting using the Doctrine_Core::ATTR_QUOTE_IDENTIFIER attribute so that the reserved word is escaped with quotes.
In Symfony you can try add one line to config/databases.yml:
all:
doctrine:
class: sfDoctrineDatabase
param:
dsn: your dsn string here
username: username
password: password
attributes:
quote_identifier: true
Oh, thanks. I really thought Doctrine should do that bu default :) But if it doesn't that's really the best fix for it.
http://trac.doctrine-project.org/ticket/1209
Bugs like this, is another side of this solution. Dunno, i've never used quote_identifier: true, prefer to rename tables ;) Good luck!
Ok, I will update a prefix in next version.