From enum to tinyint problems

Hi,
I’ve got a table with
terms_of_payment enum(‘0’,‘1’) NOT NULL DEFAULT ‘0’ COMMENT ‘0 Web customer check out in the end of the order 1 Excecutive payment by the contract’

I run
ALTER TABLE customer CHANGE terms_of_payment terms_of_payment TINYINT( 1 ) NOT NULL DEFAULT 0 COMMENT ‘0 Web customer check out in the end of the order 1 Excecutive payment by the contract’;

and I found all my customers set to 1 when I’m waiting 0

Could you explain me, what the trouble, please ?

Bye

i’m not sure why the enum converted that way

the way i would do it is to add a new column, rather than try to change the enum

then update the table, set the new column to 1 where the enum = ‘1’ and to 0 where the enum = ‘0’

then drop the enum column

just made it ! :frowning:

Thanks the same for the point.