David E. Smith on 24 Oct 2002 00:09:02 -0000 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: [spoon-discuss] today's OFFICIAL SCARY THOUGHT |
On Wed, 23 Oct 2002, Orc In A Spacesuit wrote: > I had considered writing up the entire ruleset as it would appear after the > changes, both for easy reading and for you to use, but I realized that > probably wouldn't work too well with your scripts and database. As for > implementing the changes, I'll help if you want me to, and you tell me the > details of your database system. The database -- at least the rules table thereof -- is simple enough. I don't have the schema handy, but it's basically something like this: key (an MySQL auto-increment key, mostly for making some queries simpler) rulenum rulerev (revision number) itemtype (rule, proposal, CFI, society-doc, a couple other weird types) title text nweek (when it was last changed/revised/whatever) owner (author for props, initial judge for CFIs, usually "0" for rules/charters/etc. number, looks stuff up in the "players" table) To revise a rule, you need to look up the current revision number for the relevant rule, add 1, then do a simple INSERT query. Nothin' fancy, really. (Possibly overkill, but keeping around every revision of every rule and proposal seems to be a popular choice. It's also why the database is up to about 6MB, but what the hey.) If/when we get to that point, I can pull out the exact database schema, and most of the support scripts/include() files I use. But you can also just feed me a big SQL file. (You may also want to talk to Joel about getting an account on the nomic.net server; I'll gladly give you read access to most of the database -- the 'bonus boxes' table is off limits, but most everything else is public information anyway.) ...dave _______________________________________________ spoon-discuss mailing list spoon-discuss@xxxxxxxxx http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss