[Dbix-class] ->deply doesn't honour qoute_char
onken at houseofdesign.de
onken at houseofdesign.de
Fri Jan 16 10:01:21 GMT 2009
On Fri, 16 Jan 2009 10:52:05 +0100, Peter Rabbitson <rabbit+list at rabbit.us>
wrote:
> onken at houseofdesign.de wrote:
>> Hi,
>>
>> I noticed that $schema->deploy doesn't seem to use the value of
>> quote_char
>> to quote the output.
>> The create table commands are not quoted (neither the table name nor the
>> columns).
>> After deploying, all selects use quoting correctly.
>> I am using SQLite.
>>
>
> ->deploy uses SQL::Translator directly, thus DBIC quoting will not
> apply. In the latest version of SQL::Translator we have:
>
> quote_table_names
>
> Toggles whether or not to quote table names with " in DROP and CREATE
> statements. The default (true) is to quote them.
>
> quote_field_names
>
> Toggles whether or not to quote field names with " in most statements.
> The default (true), is to quote them.
>
> So unless you are running an old SQLT version, you have encountered some
> sort of bug. Come back with more info if this is the case.
>
> _______________________________________________
SQLT is up to date (CPAN).
$ DBIC_TRACE=1 re.pl
$ use lib qw (lib);
$ use Laden::Schema;
$ my $schema = Laden::Schema->connect('dbi:SQLite:dname=test');
[snip]
$ $schema->deploy;
[snip]
CREATE TABLE user (
password character varying(38) NOT NULL,
email character varying(150) NOT NULL,
id character(36) NOT NULL,
registered datetime NOT NULL,
admin integer NOT NULL DEFAULT '0',
PRIMARY KEY (id)
):
CREATE UNIQUE INDEX user_email_user ON user (email):
So you see, there is no quoting of names.
moritz
More information about the DBIx-Class
mailing list