Update DB is failing with the following:

Update #7101
Failed: DatabaseSchemaObjectExistsException: Cannot add field redirect.status: field already exists. in DatabaseSchema_mysql->addField() (line 328 of /mnt/www/html/sas/docroot/includes/database/mysql/schema.inc).

This also seems to block 7102 from applying.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

Dave Reid’s picture

Status: Active » Fixed

Committed some changes to redirect_update_7101() to make it compatible with running more than once. Try the 7.x-1.x-dev version in a couple of hours to see if this resolves it.

  • Dave Reid committed 868744a on 7.x-2.x
    Issue #2541304 by Dave Reid: Fixed errors in cases where...
hayzer’s picture

7.x-2.x-dev worked. I will test again with 7.x-1.x-dev once available.

  • Dave Reid committed c00142f on 7.x-1.x
    Issue #2541304 by Dave Reid: Fixed errors in cases where...
hayzer’s picture

7.x-1.x is working.

Status: Fixed » Closed (fixed)

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

breezeweb’s picture

I'm still seeing this problem with 7.x-1.x-dev.

Update: I can confirm that the latest patch committed does indeed fix it after all.

sonicthoughts’s picture

Status: Closed (fixed) » Active
Dave Reid’s picture

Status: Active » Closed (fixed)
yan’s picture

I had the same problem with 7.x-1.0-rc3, but 7.x-1.x-dev does work. I hope there will be a new release some time soon. Thanks Dave Reid.

carolpettirossi’s picture

I had the same issue using the 7.x-1.0-rc3 module. When I used 7.x-1.x-dev worked properly.

philsward’s picture

+1 for a new RC release

paulvandenburg’s picture

+1 for the new RC release

paulvandenburg’s picture

Ignore this.
But I'm adding the commit from #4 as a patch here.
Because d.o does not allow me to create a release of my distribution, see #3089916: Fix redirect issue where the update hook fails forever if a status field is already present since the git.drupalcode.org domain is not trusted.

I'll open a infrastructure issue for that but in the mean time I can continue with this. If others are strugling similarly see attached ;)

This is just a download of the plain commit diff here: https://git.drupalcode.org/project/redirect/commit/c00142f39ebb25678edfd...

joshuautley’s picture

Regarding #14 - Is an uninstall recommended in order for this patch to work?

paulvandenburg’s picture

@joshuautley an uninstall should not be necessary. If you encounter the problem of this issue this update hook should never complete. So after applying the fix it should reattempt this update hook which should now be fixed.

So it should just work if you apply the fix here (either apply patch #14 or update to a release that includes this fix).

joshuautley’s picture

Re: #16 It only works if I uninstall the module and then reinstall after I've applied the patch. Prior to that I applied the patch yet the error continues to be displayed each time I run update.