Solved - Warning: Unknown column 'serialized' in 'field list' - error while upgrading Drupal

| | 2 min read
When you upgrade from Drupal 5 to Drupal 6 you might run into the following error if the upgrade was not properly done

Warning: Unknown column 'serialized' in 'field list' query: SELECT data, created, headers, expire, serialized FROM cache WHERE cid = 'variables' in [drupal 6 "/includes/database.mysqli.inc" file] on line 128

There could be several reasons why the error happened but there is a simple solution to solving this problem. This could be one of the several other similar cache related errors that could happen if the upgrade was not correct. To sort out this particular error all you have to do is to go to your database, using your database administration client like phpmyadmin, find the cache and cache_ tables and make sure that all of these have the serialized field. If this field is not present then run the following query after changing the tablename for the corresponding tables to create this field.

ALTER TABLE cache ADD serialized SMALLINT(6) NOT NULL;

Run the above query replacing cache for all the cache_ tables that did not have the serialized column. Also truncate all the cache tables after you do this. To prevent this from happening in the future upgrades from D5 to D6 make sure that you have upgraded to the latest version of D5 and that you have ran the update.php successfully without errors before continuing on to upgrading to D6. If you would like to upgrade your Drupal 5 installation to Drupal 6, let us know and we will be happy to help you with it.