avoid single quote in generated query for postgresql databse

142 views
Skip to first unread message

Régis Guyomarch

unread,
May 24, 2015, 11:43:37 AM5/24/15
to sequ...@googlegroups.com
Hello,

I use sequelize with a legacy database. the table's id are uppercase (ID).

When I do a query with sequelize , I see in the debug information that every column in surrounded with a single quot ` . Postgres normalize columns name not surrounded with doublequotes in lowercase.

I trie to use the quoteIdentifiers option without success.

How can I manage a legacy uppercase column name with sequelize ?

Thanks for your help.


Mick Hansen

unread,
May 24, 2015, 11:49:34 AM5/24/15
to Régis Guyomarch, sequ...@googlegroups.com
If you are using postgres it should be surrounding tables with '"' (double-quotes).
If you use quoteIdentifiers false it will remove the double-quotes.
Are you sure you have configured sequelize for postgres?
--
Mick Hansen
@mhansendev
mhansen.io

Régis Guyomarch

unread,
May 24, 2015, 11:50:13 AM5/24/15
to sequ...@googlegroups.com
[solved] : my bad : the driver name was mysql instead of postgresql.
Reply all
Reply to author
Forward
0 new messages