Is it ok to manually change post time in database?

Started by tjrpcaft, February 12, 2019, 04:44:32 AM

Previous topic - Next topic

tjrpcaft

Hi,

Is it ok to manually change post time in database?
And also poster id, name and email?

The reason I'm asking is because I want to import some topics and post from a CRM.
And I am thinking of creating new topics and posts, and then change the time, poster id, name and email, all editing manually the database.

Gwenwyfar

Should be, but importing topics won't be as simple as adding/editing posts. Make sure you are adding them properly.
"It is impossible to communicate with one that does not wish to communicate"

tjrpcaft

Quote from: Gwenwyfar on February 12, 2019, 04:56:05 AM
Should be, but importing topics won't be as simple as adding/editing posts. Make sure you are adding them properly.
Thank you.
And yes, I'm thinking of adding/editing.

Kindred

no.... what she means is that the posts table is not the only table you need to worry about.

Instead of doing direct SQL, you might consider using the create_post function
Слaва
Украинi

Please do not PM, IM or Email me with support questions.  You will get better and faster responses in the support boards.  Thank you.

"Loki is not evil, although he is certainly not a force for good. Loki is... complicated."

live627

the poster time can be any Unix timestamp (yes, even the epoch! Try changing it to 1!)

The poster id is linked to an entry in smf_members
Each message is also linked to id_topic which corresponds to smf_topics
smf_topics then has id_first_msg, id_member_started, id_last_msg, I forget what else

Can you keep track of all that? Good luck.

Sesquipedalian

Also be aware that changing the poster_time value will not change the order in which your posts and topics appear on the forum. SMF sorts by ID number rather than by timestamp. So if you change the timestamp on some posts but not others, they might appear to be chronologically out of order.
I promise you nothing.

Sesqu... Sesqui... what?
Sesquipedalian, the best word in the English language.

tjrpcaft

Thank you all.
Those advices are valuable and appreciated!

Advertisement: