[Dbix-class] How do I get DBIx::Class::Migration::Population to quote names? (DBIx-Class Digest, Vol 95, Issue 17)

Robert Rothenberg robrwo at gmail.com
Fri May 31 10:08:35 GMT 2013


On 28/05/13 13:01 Peter Rabbitson wrote:
> On Mon, May 27, 2013 at 06:04:25PM +0100, Robert Rothenberg wrote:
>> I have a Postgres table named "user". This needs to be quoted, and it's
>> configured to be quoted in the MyApp::Model::DB module, but
>> DBICM::Population isn't quoting it:
>>
>>> not ok 36 - populate
>>>
>>> #   Failed test 'populate'
>>> #   at t/00-deploy-test-db.t line 53.
>>> # died: DBIx::Class::Exception (DBIx::Class::Fixtures::populate(): DBI Exception: DBD::Pg::st execute failed: ERROR:  column "id" does not exist
>>> # LINE 1: SELECT setval('user_id_seq', (SELECT max(id) FROM user));
>>> #                                                  ^ [for Statement "SELECT setval('user_id_seq', (SELECT max(id) FROM user));"] at t/00-deploy-test-db.t line 48
>>> # )
>>
>> So how do I configure it to enable quoting when my test suite tries to
>> populate values?
> 
> https://metacpan.org/module/RIBASUSHI/DBIx-Class-0.08250/lib/DBIx/Class/Storage/DBI.pm#quote_names
> 
> This is under DBIC-specific connection attributes.

I've tried that. It doesn't work.





More information about the DBIx-Class mailing list