Topic: PUNBB 1.4.x Merge Error - Out of range value for column 'firstpost'
On the threads portion of the merge from PunBB 1.2.22 I get this error
MyBB Merge System - Version: 1.4 Final
156 threads are importing right now. There are 0 threads left to import and 0 pages left.
MyBB SQL Error
MyBB has experienced an internal SQL error and cannot continue.
SQL Error: 1264 - Out of range value for column 'firstpost' at row 1 Query: INSERT INTO mybb_threads (`import_tid`,`sticky`,`fid`,`firstpost`,`dateline`,`subject`,`poll`,`uid`,`import_uid`,`views`,`closed`,`totalratings`,`notes`,`visible`,`unapprovedposts`,`numratings`,`attachmentcount`,`username`,`lastpost`,`lastposter`,`lastposteruid`,`replies`,`icon`,`deletetime`) VALUES ('2','0','7','-6','1142113292','Best Metal Gear Solid game?','0','3','3','520','0','0','','1','0','0','0','','0','','0','0','0','0')
This is a brand new install of MyBB that I installed and then after setting that up, I'm doing the merge. I cant quite figure this one out, because I cant figure out how its getting that -6 in there, the punbb database doesnt have a firstpost in the punbb_topics table
I'm looking over the code and have figured the query to be
SELECT * FROM `punbb_posts` WHERE topic_id=2 ORDER BY posted ASC LIMIT 1
In convert\boards\punbb\threads.php the following code calculates the firstpost field
$insert_data['firstpost'] = ((-1) * $this->get_first_post($data['id']));
Thing is I dont know why they want it to be negative, does mybb use negative numbers for the firstpost?
I just looked at the mybb_threads table and firstpost is setup as
int(10) UNSIGNED No(null) 0(default)
so why is it multiplying by -1?