I have a tree in my database described using id and parend id. Because of historical( original programmer) reasons the id is strings. I need to convert the id to auto increment integer field and keep the structure the same. How do I do that?
I’m using mysql.
I have a tree in my database described using id and parend id. Because
Share
UPDATE my_table as t1, my_table as t2, set t1.new_parent_id = t2.new_id where t2.id = t1.parent_id