News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Errors converting YaBB 2.1 to SMF 1.1.5

Started by JMB, July 11, 2008, 10:45:28 AM

Previous topic - Next topic

JMB

I copied and pasted that into phpMyAdmin and got the following:

Quote
Error
SQL query:

ALTER TABLE smf_messages ADD UNIQUE INDEX topic( ID_TOPIC, ID_MSG ) ADD UNIQUE ID_BOARD topic(
ID_BOARD,
ID_MSG
) ADD UNIQUE ID_MEMBER topic(
ID_MEMBER,
ID_MSG
)

MySQL said:

#1064 - You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'ADD UNIQUE ID_BOARD topic (ID_BOARD, ID_MSG)
ADD UNIQUE ID_MEMBER topic (ID_MEM' at line 3


JMB

OK, worked it out. That should have been:


ALTER TABLE smf_messages
ADD UNIQUE INDEX topic (ID_TOPIC, ID_MSG)
ADD UNIQUE INDEX ID_BOARD (ID_BOARD, ID_MSG)
ADD UNIQUE INDEX ID_MEMBER (ID_MEMBER, ID_MSG)


Is that right?

SleePy

Scratch what I just posted..

Did that work?

What do the indexes does it show currently?
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

JMB

I mucked it up, so I've had to start the conversion from scratch again!  :(

With over 8000 members and 250000 messages, it'll take a while! I'll report back in a few hours and let you know!

JMB

OK, it timed out while converting poll votes again.  :(

I killed the connection. Added the missing indexes and refreshed the browser. No luck. Will try again in the morning.

As an experiment, I restarted the converter at cstep14, Cleaning up (part1).
Got an error for Duplicate key name 'topic' in smf_messages. So I dropped 'topic' and hit 'Try again'. It added 'topic' back.

Next I got an error for Duplicate key name 'ID_BOARD', so I dropped that one too and hit 'Try again'. It advanced to giving me an error for Duplicate key name 'ID_TOPIC', but it didn't add ID_BOARD back.

The same happened for ID_TOPIC and ID_MEMBER.

The same thing happens in the next cstep too. It's all the indexes you got me to add.

With my limited understanding of PHP and MySQL I'd have thought that cstep should have added those indexes back, hence the errors that they where already there. So why are they not getting added? Or am I missing something?

SleePy

My only thought could be that for some reason the script isn't being allowed to do the index dropping or additions that it does.

I guess drop them for now. Then after that is done with topics and posts, add them back in.
Jeremy D ~ Site Team / SMF Developer ~ GitHub Profile ~ Join us on IRC @ Libera.chat/#smf ~ Support the SMF Support team!

JMB

Hurrah! It worked! It says Conversion Complete! Woo Hoo!!

The only problem is that polls didn't convert properly. All the poll topics and posts are there but none of the polls themselves have any options to choose. Also the 'Maximum votes per user' is set to 0 for all polls.

JMB

OK, I got the vote options to come up. Had to run:


ALTER TABLE smf_messages
ADD KEY ID_TOPIC (ID_TOPIC)


Seemed that one wasn't getting added in cstep14.

As for the Maximum votes per user issue, it seems that only about 35 polls out of almost 300 have the right number for max votes (1). All the rest have 0.

Advertisement: