Revision history for DBIx::Class
+ * Fixes
+ - Setting quote_names propagates to SQL::Translator when producing
+ SQLite DDL (it is one of the few producers *NOT* quoting by default)
+
* Misc
- Replace $row with $result in all docs to be consistent and to
clarify various return values
$sqltargs->{producer_args}{sqlite_version} = $dver;
}
+ $sqltargs->{quote_identifiers}
+ = !!$self->sql_maker->_quote_chars
+ if ! exists $sqltargs->{quote_identifiers};
+
$self->next::method($schema, $type, $version, $dir, $sqltargs, @rest);
}
# Check deployment statements ctx sensitivity
{
my $schema = DBICTest->init_schema (no_deploy => 1);
- my $not_first_table_creation_re = qr/CREATE TABLE fourkeys_to_twokeys/;
+ my $not_first_table_creation_re = qr/CREATE TABLE "fourkeys_to_twokeys"/;
my $statements = $schema->deployment_statements;
like (
is $schema->storage->sql_maker->name_sep,
$exp_name_sep,
"$db name_sep with quote_names => 1 is $name_sep_text";
+
+ # if something was produced - it better be quoted
+ if ( my $ddl = try { $schema->deployment_statements } ) {
+
+ my $quoted_artist = $schema->storage->sql_maker->_quote('artist');
+
+ like ($ddl, qr/^CREATE\s+TABLE\s+\Q$quoted_artist/msi, "$db DDL contains expected quoted table name");
+ }
}
done_testing;