From: Tara S. <te...@cl...> - 2001-11-09 17:49:54
|
I replaced INNER JOIN by LEFT JOIN, as suggested, and got the following=20 error: Loading up virgin wiki lib/WikiDB/backend/PearDB.php:653: Fatal[256]: wikidb_backend_mysql:=20 fatal database error * DB Error: syntax error<\li> * (INSERT INTO recent (id, latestversion, latestmajor, latestminor)=20 SELECT id, MAX(version), MAX(CASE WHEN minor_edit=3D0 THEN version END),=20 MAX(CASE WHEN minor_edit<>0 THEN version END) FROM version WHERE id=3D1=20 GROUP BY id [nativecode=3DYou have an error in your SQL syntax near 'WHEN= =20 minor_edit=3D0 THEN version END), MAX(CASE WHEN minor_edit<>0 THEN versio= n=20 EN' at line 1])<\li> * <\li> lib/WikiDB/backend/PearDB.php:52: Notice[8]: Undefined property: _lock_co= unt lib/WikiDB/backend/PearDB.php:625: Notice[8]: Undefined property:=20 _lock_count WikiFatalError lib/WikiDB/backend/PearDB.php:653: Fatal[256]: wikidb_backend_mysql:=20 fatal database error * DB Error: syntax error<\li> * (INSERT INTO recent (id, latestversion, latestmajor, latestminor)=20 SELECT id, MAX(version), MAX(CASE WHEN minor_edit=3D0 THEN version END),=20 MAX(CASE WHEN minor_edit<>0 THEN version END) FROM version WHERE id=3D1=20 GROUP BY id [nativecode=3DYou have an error in your SQL syntax near 'WHEN= =20 minor_edit=3D0 THEN version END), MAX(CASE WHEN minor_edit<>0 THEN versio= n=20 EN' at line 1])<\li> * <\li> http://tara.scdi.org/newwiki/ if you want to see the disaster. Any=20 suggestions? --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ no tables: http://climbtothestars.org/coding/tableless/ Pompeurs Associ=E9s - http://pompage.net/ |
From: Jeff D. <da...@da...> - 2001-11-09 18:21:14
|
On Fri, 09 Nov 2001 18:46:06 +0100 "Tara Star" <te...@cl...> wrote: Argh. Okay, it seems CASE WHEN ... is unsupported in MySQL before 3.23.x. (And I don't think postgres supports MySQL other conditional operators, which is why I used the CASE WHEN...) Try replacing CASE WHEN cond THEN val END by IF(cond, val, NULL) I.e. "CASE WHEN minor_edit=0 THEN version END" becomes "IF(minor_edit=0,version,NULL)" and "CASE WHEN minor_edit<>0 THEN version END" becomes "IF(minor_edit<>0, version, NULL)" At least you're making progress! Jeff |
From: Jeff D. <da...@da...> - 2001-11-09 19:33:25
|
On Fri, 09 Nov 2001 "Stephanie" <st...@po...> wrote: > done: > > $maxmajor = "MAX(IF(minor_edit=0,version,NULL))"; > $maxminor = "MAX(IF(minor_edit<>0,version,NULL))"; > $maxversion = "MAX(version)"; > > it worked! Yay! > Now, say I want to migrate all my 1.2.1 pages. I need to do a zip dump > (does the admin page let me do that?) and then.... what? It's still a bit of a messy process at this point. Here's my suggestion. 1. Start 1.3.x with an empty database. Browse the FrontPage. This should fill the wiki with the distributed default 1.3.x pgsrc. (You've probably already gotten this far.) 2. Make a zip dump of your 1.2 wiki. If the contents of PhpWikiAdministration are correct there should be a links (near the top) which will do that for you. You need to be in admin mode, though. This means you must have set an admin user and passwd in admin.php, and you should be browsing through a URL like: http://path.to.your/wiki/admin.php?PhpWikiAdministration (If your PhpWikAdministration page is broken, then http://path.to.your/wiki/admin.php?zip=all should get you a zip dump.) 3. Now upload your zip dump to your new 1.3 wiki. (First you need to have set the admin user/passwd in the new index.php.) You should be able to use the "Upload File" form on the PhpWikiAdministration page. If that works, the pages from your 1.2 wiki have now overwritten the 1.3 pages (though the 1.3 pages are still saved in the archive). This will break a bunch of 1.3 functionality until you restore the page contents. Of the top of my head, some pages for which this will be an issue are: MostPopular, RecentChanges, PhpWikiAdministration, MagicPhpWikiURLs, and ReleaseNotes. To restore these pages to the original (1.3) contents: 4a. Login as the administration user (using the SignIn button at the bottom right corner of the page.) (You need to do this because some of the pages which need fixing are locked.) 4b. Browse to a page which needs restoring. Hit the "History" button (at the bottom of the page). This should get you a list of all archived versions of the page. 4c. Browse to the archive 1.3 version of the page (probably version number 1) by clicking on the version number of the desired version. 4d. Click the "Edit old revision" button (bottom of page). This should get you to the edit form. 4e. Click the "Save" button. This should save the archived page contents as the current contents. We really need to figure out a way to simplify this process, but, for now, that's what you gotta do. |
From: Tara S. <te...@cl...> - 2001-11-09 19:49:22
|
Jeff Dairiki wrote: > 1. Start 1.3.x with an empty database. Browse the FrontPage. This sho= uld > fill the wiki with the distributed default 1.3.x pgsrc. (You've probab= ly > already gotten this far.) done. > 2. Make a zip dump of your 1.2 wiki. If the contents of > PhpWikiAdministration are correct there should be a links=20 > (near the top) which will do that for you. You need to be > in admin mode, though. This means you must have set an > admin user and passwd in admin.php, and you should be browsing > through a URL like: > http://path.to.your/wiki/admin.php?PhpWikiAdministration > (If your PhpWikAdministration page is broken, then > http://path.to.your/wiki/admin.php?zip=3Dall > should get you a zip dump.) do I do the zip dump from my 1.2 wiki or from the 1.3 one? It seems to=20 me you mean that I must make the dump in the 1.2 wiki, but I can't get=20 to the admin section (see my other mail to the list). It's fun by the way, I'm getting old mail in bunches, as my dns=20 propagates I suppose. So I get the last conversations in patches (you'll=20 excuse me if some of my replies to those sound a bit out of context). > 3. Now upload your zip dump to your new 1.3 wiki. (First you need to > have set the admin user/passwd in the new index.php.) You should > be able to use the "Upload File" form on the PhpWikiAdministration > page. ok, that sounds doable, once I've got the zip ;) > If that works, the pages from your 1.2 wiki have now overwritten > the 1.3 pages (though the 1.3 pages are still saved in the archive). er... will the admin page know where to upload the zip dump? how will it=20 put the contents of the zip file in the db? *a bit confused* > This will break a bunch of 1.3 functionality until you restore > the page contents. Of the top of my head, some pages for which=20 > this will be an issue are: > MostPopular, RecentChanges, PhpWikiAdministration, > MagicPhpWikiURLs, and ReleaseNotes. ok, understood. > To restore these pages to the original (1.3) contents: [snip] that part looks ok. Can anyone give ma a quick briefing on how the templates work, so I can=20 modify them without messing everything up? Thanks, Tara --=20 Je r=E9ponds au mieux de mes connaissances Climb to the Stars! - http://climbtothestars.org/ no tables: http://climbtothestars.org/coding/tableless/ Pompeurs Associ=E9s - http://pompage.net/ |