Simple Machines Community Forum

SMF Support => Converting to SMF => Topic started by: Red Squirrel on April 14, 2015, 10:24:20 PM

Title: What is id_msg_modified in the message table?
Post by: Red Squirrel on April 14, 2015, 10:24:20 PM
I can't for the life of me figure out what this is for.  I'm writing a conversion script to convert 4 forums into 1.  What am I suppose to put for this field?  It appears to be the same ID as the post ID, but how do I know what the new ID is going to be when creating it? If I set to 0 I get a duplicate error so even if I do a mysql_insert_id() and update it after that won't work.
Title: Re: What is id_msg_modified in the message table?
Post by: margarett on April 15, 2015, 04:35:24 AM
What converter are you using, which is triggering that error?
Title: Re: What is id_msg_modified in the message table?
Post by: Red Squirrel on April 16, 2015, 08:09:35 AM
Writing my own, as I have specific requirements so it's more involved than a simple 1 to 1 conversion.

I was setting it to 0 because I did not know what it was for but it made it duplicate.  I checked the sources and it looks like it does indeed get set to the same as the post ID, so I just did that.  Can someone confirm that's really what I should do though?
Title: Re: What is id_msg_modified in the message table?
Post by: Kindred on April 16, 2015, 10:05:26 AM
there are cases when it is not the same... but we're not sure about those cases (remember, some of this code is legacy that dates back to a completely different set of developers and thought processes...)

I would say that you are probably safe in setting it to match the postID
Title: Re: What is id_msg_modified in the message table?
Post by: margarett on April 16, 2015, 12:20:44 PM
Not post id, id_message ;)
Title: Re: What is id_msg_modified in the message table?
Post by: Illori on April 16, 2015, 12:38:40 PM
Quote from: margarett on April 16, 2015, 12:20:44 PM
Not post id, id_message ;)

a lot of people call a message a post. what is the difference?
Title: Re: What is id_msg_modified in the message table?
Post by: margarett on April 16, 2015, 01:02:38 PM
None, I read topic :o
/me walks away ashamed ;D
Title: Re: What is id_msg_modified in the message table?
Post by: Kindred on April 16, 2015, 02:57:44 PM
technically, margarett is correct. id_message is the actual database column name - I just called it "post ID" because that is how the OP referred to it. :)