Upgrading patchwork

Ralf Baechle ralf at linux-mips.org
Wed Dec 7 21:29:37 EST 2011


I was still running an over two year old installation of patchwork on
linux-mips.org with various "misfeatures" and missing features.  The
upgrade was more than rough:

 o incomplete and missing documentation
 o I'm using MySQL but the migration scripts were written for another db,
   probably Postgres.
 o After all the migration scripts confirmation links were not working.
   The culprit was the type column of the patchwork_emailconfirmation
   table.  This is how it was looking:

	CREATE TABLE `patchwork_emailconfirmation` (
	  `id` int(11) NOT NULL AUTO_INCREMENT,
	  `user_id` int(11) DEFAULT NULL,
	  `email` varchar(200) NOT NULL,
	  `key` char(40) NOT NULL,
	  `date` datetime NOT NULL,
	  `active` tinyint(1) NOT NULL,
	  `type` int(11) DEFAULT NULL,
	  PRIMARY KEY (`id`),
	  KEY `patchwork_userpersonconfirmation_user_id` (`user_id`)
	) ENGINE=MyISAM AUTO_INCREMENT=15 DEFAULT CHARSET=latin1;

   But on a fresh  installation I got:

	CREATE TABLE `patchwork_emailconfirmation` (
	  `id` int(11) NOT NULL AUTO_INCREMENT,
	  `type` varchar(20) NOT NULL,
	  `email` varchar(200) NOT NULL,
	  `user_id` int(11) DEFAULT NULL,
	  `key` char(40) NOT NULL,
	  `date` datetime NOT NULL,
	  `active` tinyint(1) NOT NULL,
	  PRIMARY KEY (`id`),
	  KEY `patchwork_emailconfirmation_fbfc09f1` (`user_id`)
	) ENGINE=MyISAM DEFAULT CHARSET=latin1;

   It seems there is no migration script to perform the upgrade of the
   type column.  I've resolved that manually.

   In the 2nd definition of the patchwork_userpersonconfirmation_user_id
   key there is a strange hexadecimal suffix.  Not sure what that means ...

   Also the CHARSET=latin1 makes me feel a little uneasy because these days
   we mostly live in a UTF-8 world.

 o lib/sql/migration/006-maintainer-project-attributes.sql creates a
   table patchwork_projectmaintainer which does not exist in a fresh
   install.  Should this upgrade script just be ignored / deleted?

  Ralf


More information about the Patchwork mailing list