ALTER TABLE provisioning.voip_preferences MODIFY COLUMN `type` tinyint(3) NOT NULL default 0; ALTER TABLE provisioning.voip_preferences ADD COLUMN `data_type` enum('bool','int','string') NOT NULL default 'string'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'block_in_mode'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'block_in_clir'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'block_out_mode'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'adm_block_in_mode'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'adm_block_in_clir'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'adm_block_out_mode'; UPDATE provisioning.voip_preferences SET data_type = 'bool' where attribute = 'clir'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'lock'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'ringtimeout'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'ncos_id'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'adm_ncos_id'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'dp_dom_caller_in'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'dp_dom_callee_in'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'dp_dom_caller_out'; UPDATE provisioning.voip_preferences SET data_type = 'int' where attribute = 'dp_dom_callee_out';