ALTER TABLE `SidebarGroup`
  ADD COLUMN `order` TINYINT UNSIGNED NULL AFTER `icon`;

UPDATE SidebarGroup set `order` = (select floor(groupOrder/10) from Sidebar where sidebarGroupId = SidebarGroup.id limit 1);

ALTER TABLE `Sidebar`
  DROP COLUMN `groupOrder`;