David E. Smith on 26 Feb 2003 00:13:02 -0000


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: [spoon-discuss] Now presenting... the ruleset.


On Tue, 25 Feb 2003, bd wrote:

> Dave, what fields are in your rules table?

#
# Table structure for table `nomicrules`
#

CREATE TABLE nomicrules (
  rulekey int(11) NOT NULL auto_increment,
  rulenum int(11) NOT NULL default '0',
  rulerev int(11) NOT NULL default '0',
  ruletext mediumtext NOT NULL,
  ruletitle varchar(250) NOT NULL default '',
  itemtype enum('rule','motion','cfj','nada','soc') NOT NULL default 'rule',
  nweek mediumint(9) NOT NULL default '0',
  owner mediumint(9) NOT NULL default '0',
  PRIMARY KEY  (rulekey),
  UNIQUE KEY rulekey (rulekey),
  KEY rulenum (rulenum),
  FULLTEXT KEY ruletext (ruletext)
) TYPE=MyISAM;

# rulekey is a standard key/uid kinda thing. rulenum/rev are obvious.
# come to think of it, most of these should be obvious.
# the only tricky bit is itemtype - mostly obvious, 'cept that the 'nada'
# type is for removed/repealed objects. (I don't delete anything from
# the database, except for overwritten revisions, because one never knows
# when something might be useful later on.)

#
# Table structure for table `attribs`
#

CREATE TABLE attribs (
  rulenum mediumint(9) default NULL,
  keyword tinytext
) TYPE=MyISAM;

# this is why an automated 'calculate rule priorities' script will be,
# um, painful. This is just a list of rulenumbers and text attributes
# like 'Layer 2' or 'Chutzpah 3' or the occasional 'Deactivated'.
# there's cruft in there, like attributes for rules that have since been
# repealed.

...dave
_______________________________________________
spoon-discuss mailing list
spoon-discuss@xxxxxxxxx
http://lists.ellipsis.cx/mailman/listinfo/spoon-discuss