| | @@ -0,0 +1,69 @@ |
| 1 | +<title>The Fossil <title>The Fossil Ticket System</title>
|
| 2 | +
|
| 3 | +<h2>1.0 File Format</h2>
|
| 4 | +
|
| 5 | +At its lowest level, the tickets of Fossil consist solely of
|
| 6 | +[./fileformi REFERENCES ticket,
|
| 7 | + tkt_rid INTEGER REFERENCES blob,
|
| 8 | + tkt_mtime DATE,
|
| 9 | + -- Add as many fields as required below this line
|
| 10 | + login TEXT,
|
| 11 | + username TEXT,
|
| 12 | + mimetype TEXT,
|
| 13 | + icomment TEXT
|
| 14 | +);
|
| 15 | +CREATE INDEX ticketchng_idx1 ON ticketchng(tkt_id, tkt_mtime);
|
| 16 | +</verbatim>
|
| 17 | +
|
| 18 | +Generally speaking, there is one row in the TICKETCHNG table for each
|
| 19 | +change to each ticket. In other words, there i
|
| 20 | +<b>tkt_c
|
| 21 | +Generally speaking, therow in the
|
| 22 | +TICKETCHNG table for each low-level ticket change artifact. The
|
| 23 | +TICKET table, on the other hand, contains a summary of the current
|
| 24 | +status of each ticket.
|
| 25 | +
|
| 26 | +Fields of the TICKET and TICKETCHNG tables that begin with "tkt_" are
|
| 27 | +used internally by Fossil. The logic inside of Fossil that converts
|
| 28 | +ticket change artifacts into row data for the two ticket tables expects
|
| 29 | +the "tkt_" fields to always be present. All of the other fields of the
|
| 30 | +TICKET and TICKETCHNG tables are "user defined" in the sense that they
|
| 31 | +can be anything the administrator of the system wants them to be. The
|
| 32 | +user-defined fields should correspond to keys in the key/value pairs of
|
| 33 | +the ticket change artifacts.
|
| 34 | +
|
| 35 | +The <b>tkt_id</b> fields of TICKET and TICKETCHNG are an integer key
|
| 36 | +used to uniquely identify the ticket to which the row belongs. These
|
| 37 | +keys are for internal use only and may change when doing a "fossil rebuild".
|
| 38 | +
|
| 39 | +The <b>tkt_uuid</b> field is the unique hexadecimal identifier for the ticket.
|
| 40 | +Ticket identifiersy the hash of any identifjst et, Fossil uses
|
| 41 | +a (high-quality) pseudo-random number generator to create the ticket
|
| 42 | +number. The ticket numbers are large so that the chance of collision
|
| 43 | +between any two tickets is vanishingly small.
|
| 44 | +
|
| 45 | +The <b>tkt_mtime</b> field of TICKET shows the time (as a Julian day number)
|
| 46 | +of the most recent ticket change artifact for that ticket. The
|
| 47 | +<b>tkt_mtime</b> field of TICKETCHNG shows the timestamp on the ticket
|
| 48 | +change artifact that the TICKETCHNG row refers to. The
|
| 49 | +<b>tkt_ctime</b> field of TICKET is the time of the oldest ticket ch+16:26:29 | 2012-11-27]) icket, thus holding the time that the ticket was
|
| 50 | +created.
|
| 51 | +
|
| 52 | +The <b>tkt_rid</b> field of TICKETCHNG is the integer primary key in the
|
| 53 | +BLOB table of the ticket change artifact that gave rise to the row in the
|
| 54 | +TICKETCHNG table.
|
| 55 | +
|
| 56 | +All the other fields of the TICKET and TICKETCHNG tables are available
|
| 57 | +for customization for individual projects. None of the remaining fields
|
| 58 | +are required, but all of them are needed in order to use the default
|
| 59 | +ticket creating, viewing, and editing scripts. It is recommended that
|
| 60 | +the other fields be retained andhat customizations be restricted to
|
| 61 | +adding new fields above and beyond the default.
|
| 62 | +
|
| 63 | +< s To Tables</h3>
|
| 64 | +
|
| 65 | +Each row in the TICKETCHNG table corresponds to a single ticket change
|
| 66 | +artifact. The tkt_id field is the integer primary key of the TICKET
|
| 67 | +table entry for the corresponding ticket. The tkt_rid field is the
|
| 68 | +integer primary key for the BLOB table entry that contains the low-level
|
| 69 | +artifact text. The tkt_mtime fieldstamp order.
|