   KEY `ix_distro_id` (`distro_id`),
   KEY `ix_eol_date` (`eol_date`)
 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('10.04_Desktop',1,'2013-05-31');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('10.04_Server',1,'2015-04-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('12.04_Desktop',1,'2017-04-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('12.04_Server',1,'2017-04-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('14.04_Desktop',1,'2019-04-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('14.04_Server',1,'2019-04-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('6',2,'2016-02-28');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('7',2,'2024-07-26');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('15',3,'2012-06-26');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('16',3,'2013-02-12');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('17',3,'2013-07-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('18',3,'2014-01-14');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('19',3,'2014-07-26');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('20',3,'2015-01-26');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('5',4,'2017-03-31');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('6',4,'2020-11-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('5',5,'2017-03-31');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('6',5,'2020-11-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('7',5,'2024-06-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('5',6,'2017-03-31');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('6',6,'2020-11-30');
-INSERT INTO distro_version(version_num,distro_id,eol_date) VALUES('7',6,'2024-06-30');
+INSERT INTO distro_version SELECT * from distro_version_old;
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('10.04_Desktop',1,'2013-05-31');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('10.04_Server',1,'2015-04-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('12.04_Desktop',1,'2017-04-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('12.04_Server',1,'2017-04-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('14.04_Desktop',1,'2019-04-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('14.04_Server',1,'2019-04-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('6',2,'2016-02-28');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('7',2,'2024-07-26');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('15',3,'2012-06-26');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('16',3,'2013-02-12');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('17',3,'2013-07-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('18',3,'2014-01-14');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('19',3,'2014-07-26');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('20',3,'2015-01-26');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('5',4,'2017-03-31');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('6',4,'2020-11-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('5',5,'2017-03-31');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('6',5,'2020-11-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('7',5,'2024-06-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('5',6,'2017-03-31');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('6',6,'2020-11-30');
+INSERT IGNORE INTO distro_version(version_num,distro_id,eol_date) VALUES('7',6,'2024-06-30');
+DROP table distro_version_old;
 
-CREATE TABLE IF NOT EXISTS users (
+CREATE TABLE users_old LIKE users;
+INSERT INTO users_old SELECT * FROM users;
+DROP TABLE users;
+CREATE TABLE users (
   `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
   `user_id` varchar(40) NOT NULL,
   `email` varchar(80) NOT NULL,
   `admin` tinyint(1) NOT NULL DEFAULT '0',
-  `display_name` varchar(50) NOT NULL,
+  `display_name` varchar(50) DEFAULT NULL,
   `password` char(41) NOT NULL,
   PRIMARY KEY (`id`),
   UNIQUE INDEX (`email`)
 ) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8;
+INSERT INTO users SELECT * from users_old;
+DROP table users_old;
 
-CREATE TABLE IF NOT EXISTS `patches` (
+CREATE TABLE patches_old LIKE patches;
+INSERT INTO patches_old SELECT * FROM patches;
+DROP TABLE patches;
+CREATE TABLE `patches` (
   `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
   `server_name` varchar(40) NOT NULL,
   `package_name` varchar(60) NOT NULL,

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

DROP TABLE IF EXISTS `distro`;
CREATE TABLE `distro` (
  `id` mediumint(8) unsigned NOT NULL AUTO_INCREMENT,
  `distro_name` varchar(20) NOT NULL,

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,
