Never seen the following before. Just performed an upgrade on a site from D5 to D6 a few days ago and now whenever I try to post something with a license I get the following message without any license. Sure enough, the license's aren't stickin'.

user warning: Unknown column 'license' in 'field list' query: INSERT INTO creativecommons_lite (nid, license) VALUES (914, 'by') in /var/www/me/mysite/sites/all/modules/creativecommons_lite/creativecommons_lite.module on line 416.

Any help is much appreciated.

Comments

foxtrotcharlie’s picture

Looks like the database schema has changed and there's no update that updates it.

Here's some sql that should fix the database table:

ALTER TABLE creativecommons_lite DROP id;
ALTER TABLE creativecommons_lite DROP INDEX nid;
ALTER TABLE creativecommons_lite ADD PRIMARY KEY(nid);
ALTER TABLE creativecommons_lite CHANGE nid nid INT( 10 ) UNSIGNED NOT NULL DEFAULT '0';
ALTER TABLE creativecommons_lite CHANGE data license VARCHAR( 12 ) NOT NULL DEFAULT '';

Remember - this only needs to be done if you're upgrading from the Drupal 5 version.

yan’s picture

Thanks foxtrotcharlie, it looks as if that worked for me. Would have been nice to have that automated during the upgrade process.