Differences From:
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]
To:
File
src/schema.c
part of check-in
[3b5514ed82]
- The "tag" command allows tag artifacts to be inserted for creating and
cancelling tags and properties. Timeline responds to bgcolor, br-bgcolor,
comment, and user properties.
by
drh on
2007-09-22 15:50:14.
[view]
@@ -157,9 +157,13 @@
@ type TEXT, -- Type of event
@ mtime DATETIME, -- Date and time when the event occurs
@ objid INTEGER PRIMARY KEY, -- Associated record ID
@ uid INTEGER REFERENCES user, -- User who caused the event
+@ bgcolor TEXT, -- Color set by 'bgcolor' property
+@ brbgcolor TEXT, -- Color set by 'br-bgcolor' property
+@ euser TEXT, -- User set by 'user' property
@ user TEXT, -- Name of the user
+@ ecomment TEXT, -- Comment set by 'comment' property
@ comment TEXT -- Comment describing the event
@ );
@ CREATE INDEX event_i1 ON event(mtime);
@
@@ -200,8 +204,12 @@
@ CREATE TABLE tag(
@ tagid INTEGER PRIMARY KEY, -- Numeric tag ID
@ tagname TEXT UNIQUE -- Tag name. Prefixed by 'v' or 'b'
@ );
+@ INSERT INTO tag VALUES(1, 'bgcolor'); -- TAG_BGCOLOR
+@ INSERT INTO tag VALUES(2, 'br-bgcolor'); -- TAG_BR_BGCOLOR
+@ INSERT INTO tag VALUES(3, 'comment'); -- TAG_COMMENT
+@ INSERT INTO tag VALUES(4, 'user'); -- TAG_USER
@
@ -- 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
@@ -217,8 +225,18 @@
@ UNIQUE(rid, tagid)
@ );
@ CREATE INDEX tagxref_i1 ON tagxref(tagid);
;
+
+/*
+** Predefined tagid values
+*/
+#if INTERFACE
+# define TAG_BGCOLOR 1
+# define TAG_BR_BGCOLOR 2
+# define TAG_COMMENT 3
+# define TAG_USER 4
+#endif
/*
** The schema for the locate FOSSIL database file found at the root
** of very check-out. This database contains the complete state of