type this script on the query and run it
update cq_eudemon set item_type = item_type + 4000, damage_type = 5 where item_type < 1075999 and magic_defence > 1071999;
update cq_eudemon set item_type = item_type - 3000 where item_type > 1077000 and magic_defence > 1071999;
it worked for me 10000000000%