-CREATE TABLE IF NOT EXISTS `patch_allpackages` (
+CREATE TABLE patch_allpackages_old LIKE patch_allpackages;
+INSERT INTO patch_allpackages_old SELECT * FROM patch_allpackages;
+DROP TABLE patch_allpackages;
+CREATE TABLE `patch_allpackages` (
   `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
   `server_name` varchar(20) NOT NULL,
   `package_name` varchar(60) NOT NULL,

  KEY `server_name` (`server_name`),
  KEY `ix_package_name` (`package_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1450 DEFAULT CHARSET=utf8;

  KEY `ix_server_name` (`server_name`),
  KEY `ix_package_name` (`package_name`)
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
INSERT INTO patch_allpackages SELECT * from patch_allpackages_old;
DROP table patch_allpackages_old;

CREATE TABLE servers_old LIKE servers;
INSERT INTO servers_old SELECT * FROM servers;
DROP TABLE servers;
CREATE TABLE `servers` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `server_name` varchar(20) NOT NULL,
  `distro_id` mediumint(8) NOT NULL,
