Hi everyone,

I have a small migration problem here: In my Table (Postgres adapter, in 
case this matters) I originally had the fields

    Field('co2_pot_masse', type='double'),
    Field('thermisch_bedingt', compute=lambda r: 0.18*r.co2_pot_masse),

Now, if I change this to 

    Field('co2_pot_masse', type='double'),
    Field('thermisch_bedingt', type='double', compute=lambda r: 
0.18*r.co2_pot_masse),

which obviously makes more sense (my bad..) I get an error:

<class 'psycopg2.ProgrammingError'> column "elektrisch_bedingt__tmp" is of 
type double precision but expression is of type character varying LINE 1: 
UPDATE Zement SET elektrisch_bedingt__tmp=elektrisch_bedingt... ^ HINT: You 
will need to rewrite or cast the expression. 
At this point, I am reluctant to drop the table and recreate it, because 
there are linked tables and data has been edited manually. Is there a 
simpler way for recovery?

Thanks a lot,
Martin

-- 



Reply via email to