From: John C. <ad...@di...> - 2002-01-09 23:00:23
|
Feel free to copy me. Nice catch on that! I'll upload it to SourceForge with the other upgrade scripts that are there. jc ----- Original Message ----- From: <jg...@fl...> To: <pos...@li...> Sent: Wednesday, January 09, 2002 5:10 PM Subject: [Post-nuke-users] Sucess->Problem upgrading from old php-nuke > I have edited and combined the following php-nuke upgrade scripts: > upgrade1-25.php > upgrade25-35.php > upgrade35-4.php > upgrade42_43.php > upgrade43-44.php > upgrade44-50.php > > I skipped upgrade2-25.php because it appears to be a duplicate of > upgrade1-25.php. After adding some comments and debug type stuff I > found I recieved this error: > > Alteration of stories table failed! #3 > 1064: You have an error in your SQL syntax near 'fulltext bodytext text' > at line 1 > > The #3 was added by me to differentiate a little quicker where the > script was failing. This code is located in the upgrade25-35.php file. > Here is the code block: > > $result = mysql_query( > "ALTER TABLE stories > CHANGE fulltext bodytext text"); > if (!$result) { > echo "Alteration of stories table failed! #3<br>" > .mysql_errno(). ": ".mysql_error(). "<br>"; > return; > } > > I've formatted it a little to (hopefully) make it more readable. I > surfed over to: > http://www.mysql.com/doc/A/L/ALTER_TABLE.html > > According to them, the syntax for CHANGE is: > CHANGE [COLUMN] old_col_name create_definition [FIRST | AFTER column_name] > > I wasn't sure what to do so I commented out that particular block hoping > the post-nuke conversion scripts would handle it (after I thought about > it, it made sense they didn't, this is php-nuke v2.5-v3.5). After > commenting it out I ran the upgrade scripts without error and then ran > the post-nuke upgrade/conversion scripts. Everything ran smoothly. > When I pressed finish it took me to the sites index page and I got this > error after the "Welcome to PostNuke" article: > DB Error: getArticles: 1054: Unknown column 'nuke_stories.bodytext' in > 'field list' > > After a little investigation I noticed that my php-nuke-pre4.4 database > table nuke.stories had a column called resttext. After comparing this > with the post-nuke.sql script for a new install I discovered that there > was a column in the $prefix_stories table called bodytext. It appears > there was a typo in the upgrade scripts for php-nuke 2.5-3.5. The > CHANGE statement should read: > > CHANGE resttext bodytext text > > After I implemented this in my upgrade script I have finally succedded > in converting the php-nuke-pre4.4 database to a post-nuke .72. Yeah > baby!!!!!! > > Now I'm off to seperate the sludge which appears to have crept into a > few of the other areas. > > I have the custom script with comments available and would like to send > it to someone at postnuke but don't know who. > > Thanks for all the quick responses and tips. > > Jesse > > > > > > _______________________________________________ > Post-nuke-users mailing list > Pos...@li... > https://lists.sourceforge.net/lists/listinfo/post-nuke-users > > |