[jifty-devel] Bug in Jifty::Record::columns leading to problems in "jifty schema --setup"

Henry Baragar Henry.Baragar at instantiated.ca
Thu Jul 5 09:43:37 EDT 2007


Hello,

Jifty::Record::columns lists "customer_id" twice when given the following 
column definition:

    column customer_id =>
        type is 'integer',
        is mandatory,
        refers_to Billing::Model::Customer,
        render_as 'hidden',
        since '0.17.8',
        ;

I have not be able to figure out why it does this, but I can tell you that it 
does not list "customer_id" twice if the "refers_to" is removed, nor if the 
column is named something else (such as "customer_di").

This is normally not a problem for us, except for when we run  "jifty schema 
--setup", in which case we get the following error messages:

WARN - DBD::mysql::st execute failed: Duplicate column name 'customer_id' 
at /usr/local/lib/perl/5.8.8/Jifty/DBI/Handle.pm line 512.
WARN - Jifty::Handle=HASH(0xa64fd4c) couldn't execute the query 'ALTER TABLE 
accounts ADD COLUMN customer_id integer NOT NULL  ' 
at /usr/local/lib/perl/5.8.8/Jifty/DBI/Handle.pm line 528.
error updating a table: Couldn't execute the query 'ALTER TABLE accounts ADD 
COLUMN customer_id integer NOT NULL  'Duplicate column name 'customer_id' 
at /usr/local/lib/perl/5.8.8/Jifty/Script/Schema.pm line 559.

Regards,
Henry


More information about the jifty-devel mailing list