I got brave and tried a test, using phpMyAdmin to manaully insert a row. I don't see any obvious problems yet. I put my user id in but see that it doesn't lookup my name, and have to enter that manually as well. The "cur_random" I'm guessing is for the "present random article" logic, and an ordinary random number generator value could be placed in there. I presume the "cur_isnew" flag is primarily for "present new pages" logic, but I may not want to flood that page anyway. Most of the other fields have default values that seem to be fine.
At 06:54 PM 2/6/05, you wrote:
On Sun, 06 Feb 2005 03:59:32 -0600, =James Birkholz= j.birchwood@verizon.net wrote:
I will soon need to create thousands of pages with a standard bit of text on each. Is there any reason that I can't just use php and add records to the "cur" table, putting values in the "cur_title" and "cur_text" fields? Do I need to set values in any of the other fields of the "cur" table, or any other tables?
Well, I'm no expert on the database structure, but I'd imagine you'll have to put *something* valid (in the sense of vaguely similar to what MediaWiki would have put there) in *every* field of the cur table, else MediaWiki'll get mighty confused when it tries to do something like display the page history . Importantly, get cur_namespace right - don't be fooled into thinking there are articles called things like "User:Foo", when they're actually called "Foo" with cur_namespace=2 (you may know this already, but I think it's a reasonably common "gotcha", so worth pointing out). Also, I'd create a "fake" user to assign the edits to, and call it "Content seeding script" or something appropriate to show up in the page histories.
As for other tables, there are various scripts in the 'maintenance' directory for rebuilding various things, such as recentchanges, the links table, etc. It might be worth running at least some of those to make things consistent after your mass changes.
-- Rowan Collins BSc [IMSoP] _______________________________________________ MediaWiki-l mailing list MediaWiki-l@Wikimedia.org http://mail.wikipedia.org/mailman/listinfo/mediawiki-l
James Birkholz admin, Posen-L mailing list and website http://www.Posen-L.com