Subject: | DBIx::Class::Schema::Versioned _source_exists fails with 'quote_char' => '"' set |
A problem is in DBIx::Class::Schema::Versioned
Private function _source_exists does not work with postgresql if
connect_info includes 'quote_char' => '"'.
$rs->search({ 1, 0 })->count
at line 728 results in SQL request
"SELECT COUNT( * ) FROM "dbix_class_schema_versions" "me" WHERE ( "1"
= ? )" with ParamValues: 1='0'
and DBD::Pg raises exception
DBI Exception: DBD::Pg::st execute failed: ERROR: column "1" does not
exist
Suggested solution:
use something like
$rs->search(undef, { where => \"1=0" })->count
instead of
$rs->search({ 1, 0 })->count