Simple Machines Community Forum

SMF Support => SMF 1.1.x Support => Topic started by: aswuser on June 10, 2021, 02:35:29 PM

Title: Error! 1075 upgrade 1.1.21 to 2.0.17
Post by: aswuser on June 10, 2021, 02:35:29 PM
I am trying to run upgrade  from 1.1.21 to 2.0.17. The upgrader started but stopped with error "Error! 1075".

I see from this post that

QuoteThe 1075 description is "ERROR 1075 (42000): Incorrect table definition; there can be only one auto column and it must be defined as a key". I would suggest doing a db export - structure only - and scan for a table definition that violates that rule.

https://www.simplemachines.org/community/index.php?topic=577057.0

I have exported the db structure (attached). It looks like NONE of my tables has "PRIMARY KEY" defined. How do I fix that?

I am not really sure what I should be looking for here.
Title: Re: Error! 1075 upgrade 1.1.21 to 2.0.17
Post by: shawnb61 on June 11, 2021, 12:51:05 AM
If you scroll down, you will see the PRIMARY KEYs defined.  Those are there.  But the indexes in general are incomplete, many are missing.  So you have a slight variation of that previous issue, where another 1.1 forum was missing most of its indexes somehow.

The upgrader is not going to work with the DB being so far off.

So...

The first step is to repair your 1.1 forum - get its structure back to where it is supposed to be.  After that, we can re-attempt the upgrade.

The steps I would follow are:
1. BACKUP - Do one with data & structure - for recovery purposes if needed. We need to be able to put things back if needed.
2. BACKUP - Do one with data only - to see if we can rebuild.
3. Build an empty 1.1 DB - get the install_1-1.sql file from an old 1.1 build and execute it.
4. TRUNCATE all tables in your (not quite) empty 1.1 DB.
5. RESTORE using the backup made in step 2 above.  The DATA ONLY backup should really just be a bunch of inserts. 
6. Point your 1.1 forum to the new DB.  It should work.

This is a weird scenario, not something done every day.  But this is how I would approach it.

Hope this helps,
Title: Re: Error! 1075 upgrade 1.1.21 to 2.0.17
Post by: Doug Heffernan on June 13, 2021, 06:43:39 AM
This has been taken care of. @aswuser contacted me and I was able to fix all the database errors and successgully upgrade their forum to the latest version, 2.0.18.
Title: Re: Error! 1075 upgrade 1.1.21 to 2.0.17
Post by: Aleksi "Lex" Kilpinen on June 13, 2021, 07:11:45 AM
Marking solved then, glad to hear it got resolved.
For the OP, feel free to mark the topic not solved again, if there is something you still need assistance with.