The schema for this module defines primary keys of multiple fields as 'field1, field2, field3' rather than 'field1', 'field2', 'field3'.

This patch fixes, but it doesn't offer an upgrade path for those who have already installed with the bad key definitions.

CommentFileSizeAuthor
#2 amazon.330525.patch1.01 KBAnonymous (not verified)
amazon_schema_keys.patch1.08 KBAnonymous (not verified)

Comments

Anonymous’s picture

For MySQL, an upgrade path isn't needed. MySQL can cope with the SQL for defining these keys and make the right keys. I don't know about Postgres. Schema module complains about the keys being incorrect in the schema, and they don't match the Schema API definitions which call for "an array of one or more key column specifers that form the primary key."

Anonymous’s picture

StatusFileSize
new1.01 KB

The attached patch should add an update scheme (this will display an error for installations, where the primary keys have already been added. But I'm not sure whether all supported db-systems could read the previous primary key scheme..)

In addition it changes amazon_uninstall (using drupal_uninstall_schema instead of db_query)

eaton’s picture

Status: Needs review » Fixed

A slightly modified version of the patch has been committed -- the update hook first drops any existing primary keys, then re-adds them. Thanks for the fix!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.