Advertisement:

Author Topic: Large board upgrade error - "Data truncated for column 'poster_ip_old'"  (Read 986 times)

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
Not the same ID...

176217   5525   9   1105461436   4   0   Newcastle Meet - 15 &amp; 16 April   Ashley_Davidson   sales@mar******ts.com   81.134.33.103 81.138.57.64 81.136.244.226 81.133.2...   0   1113178706   Ashley_Davidson   Update - Update<br><br>Friday night 15th.<br><br>W...   xx   1

Offline Arantor

  • Resident Overthinker
  • SMF Friend
  • SMF Legend
  • *
  • Posts: 70,993
    • StoryBB/StoryBB on GitHub
OK so that at least answers the question of what the column contains - it contains multiple IP addresses. Quite *why* it contains multiple IP addresses is another story and you should probably just trim the ones that are over-long by hand rather than trying modify the installer.

To find all the ones that are weird like this:

SELECT * FROM smf_messages WHERE poster_ip LIKE '% %';

This will find all the ones with spaces in so you can prune off the IP addresses after the first one.
Don’t try to tell me that some power can corrupt a person. You haven’t had enough to know what it’s like.

No good deed goes unpunished / No act of charity goes unresented.

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
wow, there's 5317 of them

as you can tell SQL isn't my thing... Is there a script/whatever I can run that will delete the extra ones for me?

Online albertlast

  • Development Contributor
  • Full Member
  • *
  • Posts: 550
since the value is unvalid i would recommand to mark this entries (the ip values) as unkown:
Code: [Select]
update smf_messages set poster_ip = 'unknown' where poster_ip LIKE '% %'

Result would be that the ip address of this post get lost,
but in my eyes is the information already lost,
so nothing wrong here.

Offline Gilrod

  • Semi-Newbie
  • *
  • Posts: 81
That did it! all upgraded to 2.1 now.

re: your question about HOW I had more than 1 IP address... I originally moved to SMF years ago, but from a YaBB2 forum, I seem to remember YaBB stored ALL your IP addresses you logged in from, NOT just the one from a specific post. I wonder if when going from YaBB to SMF it took at IP addresses used?!

Anyway, thanks for the help all!