When upgrading a site from Drupal 6, the comment module can fail on update hook 7002 because the comment table may have already been renamed from D6's 'comments' to D7's 'comment' once before, and any attempt to re-run the upgrade process will fail at the first line of this hook, essentially skipping several really important things.

The attached patch checks for the existence of an old table named 'comments' before safely attempting a table re-name to 'comment'.

CommentFileSizeAuthor
#1 1462144_comment_safely_rename_table.patch558 bytessenpai

Comments

senpai’s picture

StatusFileSize
new558 bytes

Attaching the patch.

Status: Needs review » Needs work

The last submitted patch, 1462144_comment_safely_rename_table.patch, failed testing.

senpai’s picture

Version: 8.x-dev » 7.x-dev
Status: Needs work » Needs review

Woops. Changing from 8.x-dev to 7.x-dev.

senpai’s picture

vthirteen’s picture

it worked for me!

senpai’s picture

Priority: Minor » Major

I guess this isn't really a minor issue, because it prevents a D6 to D7 upgrade if *anything* else caused the update.php to need a second run-through.

catch’s picture

Status: Needs review » Closed (works as designed)

Updates aren't re-entrant, you need to start over with a fresh database every time.

Bad enough trying to get it working running them once.

off’s picture

work correctly