Topic on Project:Support desk

Forgot to backup a database before an update, now getting errors. Anything I can do?

3
SupermanFan97 (talkcontribs)

Hello!

I've been running a wiki install for about two years now and I haven't backed it up at all in those years. What I "thought" was backing it up was not, and now I'm paying the consequences of my actions. I upgraded from 1.29 to 1.31.1 and I've been getting this error whenever I tried upgrading or downgrading.

Error: 1091 Can't DROP 'ct_rc_id'; check that column/key exists (localhost)


All the solutions I found referenced using backups to fix the problem, which I cannot do. Is there anything else I can do to solve this issue? if not, I've been thinking about exporting all of my pages, making a clean install and importing the .xml file and re-uploading images manually

Edit: Not really a tech guy so I'm a bit out of my element, but if I need to post some more technical information, let me know.

Version: 7.1.14

PHP: 7.1.14

MySQL: 5.6.41-84.1

ICU: 4.2.1

LUA: 5.1.5

Ciencia Al Poder (talkcontribs)

This is apparently the same problem as Topic:Ukol0fkinjvqe5a7.

Since it's trying to run a script, that attempts to do several changes, if one of them fails the entire update fails.

The file it's trying to run is patch-change_tag-indexes.sql.

As a workaround, you can try to edit the patch-change_tag-indexes.sql file and remove the first sentence and execute the upgrade script again. If it fails on the next one, delete it and do that over and over again until the file is empty and the upgrade script continues.

Note that you can't downgrade MediaWiki once you've (started) upgraded the database with the update.php script!

SupermanFan97 (talkcontribs)

Thanks for the reply! Your method worked like a charm, thanks!

I saw that thread beforehand, but even though the error message was the same, our problems were different. I think at least, since I was able to save and create pages just fine.

Thanks again for your help. I appreciate it.