I updated the module, but discovered that the update script failed with the following message:

Failed: DatabaseSchemaObjectExistsException: Cannot add field invite.status: field already exists. in DatabaseSchema_mysql->addField()

It seems like the update might be missing a check for if the field exists.

Comments

rositis created an issue. See original summary.

ryan osītis’s picture

StatusFileSize
new720 bytes

That is indeed what the problem was.

ryan osītis’s picture

Status: Active » Needs review
SpartyDan’s picture

StatusFileSize
new1.06 KB

The status field might already exist on the invite table with incorrect settings. For example 'not null' might be set to FALSE when it needs to be set to true.

Therefore, we need to check if the status field exists in the invite table. If it does drop it.

We could update the properties of the status field but dropping it and re-adding is easier. Dropping the status field has no negative consequences for our data because this update hook is going to overwrite all the values in the status field later in the hook.

I believe that this is a more robust solution than #2 because it doesn't assume that the field exists and is properly formatted.

SpartyDan’s picture

Status: Needs review » Fixed

Committed to 7.x-4.x

Thank you!

  • e8d9745 committed on 7.x-4.x
    Issue #2720841 by rositis@gmail.com, SpartyDan: Update 7401 failing
    

Status: Fixed » Closed (fixed)

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