Diff
Not logged in

Differences From:

File src/schema.c part of check-in [2bc0e2c565] - Work toward adding a tagging system. Code compiles but is incomplete and probably does not work. by drh on 2007-09-21 02:41:53. [view]

To:

File src/schema.c part of check-in [5e2392307d] - Turn tags into properties. Allow properties to control background color on timelines. Still experimental. by drh on 2007-09-22 01:40:39. [view]

@@ -201,18 +201,23 @@
 @   tagid INTEGER PRIMARY KEY,       -- Numeric tag ID
 @   tagname TEXT UNIQUE              -- Tag name.  Prefixed by 'v' or 'b'
 @ );
 @
-@ -- Assignments of tags to baselines
+@ -- Assignments of tags to baselines.  Note that we allow tags to
+@ -- have values assigned to them.  So we are not really dealing with
+@ -- tags here.  These are really properties.  But we are going to
+@ -- keep calling them tags because in many cases the value is ignored.
 @ --
 @ CREATE TABLE tagxref(
 @   tagid INTEGER REFERENCES tag,   -- The tag that added or removed
 @   addFlag BOOLEAN,                -- True to add the tag, False to remove
 @   srcid INTEGER REFERENCES blob,  -- Origin of the tag. 0 for propagated tags
+@   value TEXT,                     -- Value of the tag.  Might be NULL.
 @   mtime TIMESTAMP,                -- Time of addition or removal
 @   rid INTEGER REFERENCE blob,     -- Baseline that tag added/removed from
 @   UNIQUE(rid, tagid)
 @ );
+@ CREATE INDEX tagxref_i1 ON tagxref(tagid);
 ;
 
 /*
 ** The schema for the locate FOSSIL database file found at the root