| | @@ -28,11 +28,11 @@ |
| 28 | 28 | @ -- ~/.fossil file and that stores information about the users setup. |
| 29 | 29 | @ -- |
| 30 | 30 | @ CREATE TABLE global_config( |
| 31 | 31 | @ name TEXT PRIMARY KEY, |
| 32 | 32 | @ value TEXT |
| 33 | | -@ ); |
| 33 | +@ ) WITHOUT ROWID; |
| 34 | 34 | @ |
| 35 | 35 | @ -- Identifier for this file type. |
| 36 | 36 | @ -- The integer is the same as 'FSLG'. |
| 37 | 37 | @ PRAGMA application_id=252006675; |
| 38 | 38 | ; |
| | @@ -133,11 +133,11 @@ |
| 133 | 133 | @ CREATE TABLE config( |
| 134 | 134 | @ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry |
| 135 | 135 | @ value CLOB, -- Content of the named parameter |
| 136 | 136 | @ mtime DATE, -- last modified. seconds since 1970 |
| 137 | 137 | @ CHECK( typeof(name)='text' AND length(name)>=1 ) |
| 138 | | -@ ); |
| 138 | +@ ) WITHOUT ROWID; |
| 139 | 139 | @ |
| 140 | 140 | @ -- Artifacts that should not be processed are identified in the |
| 141 | 141 | @ -- "shun" table. Artifacts that are control-file forgeries or |
| 142 | 142 | @ -- spam or artifacts whose contents violate administrative policy |
| 143 | 143 | @ -- can be shunned in order to prevent them from contaminating |
| | @@ -146,14 +146,14 @@ |
| 146 | 146 | @ -- Shunned artifacts do not exist in the blob table. Hence they |
| 147 | 147 | @ -- have not artifact ID (rid) and we thus must store their full |
| 148 | 148 | @ -- UUID. |
| 149 | 149 | @ -- |
| 150 | 150 | @ CREATE TABLE shun( |
| 151 | | -@ uuid UNIQUE, -- UUID of artifact to be shunned. Canonical form |
| 151 | +@ uuid TEXT PRIMARY KEY,-- UUID of artifact to be shunned. Canonical form |
| 152 | 152 | @ mtime DATE, -- When added. seconds since 1970 |
| 153 | 153 | @ scom TEXT -- Optional text explaining why the shun occurred |
| 154 | | -@ ); |
| 154 | +@ ) WITHOUT ROWID; |
| 155 | 155 | @ |
| 156 | 156 | @ -- Artifacts that should not be pushed are stored in the "private" |
| 157 | 157 | @ -- table. Private artifacts are omitted from the "unclustered" and |
| 158 | 158 | @ -- "unsent" tables. |
| 159 | 159 | @ -- |
| | @@ -181,11 +181,11 @@ |
| 181 | 181 | @ -- |
| 182 | 182 | @ CREATE TABLE concealed( |
| 183 | 183 | @ hash TEXT PRIMARY KEY, -- The SHA1 hash of content |
| 184 | 184 | @ mtime DATE, -- Time created. Seconds since 1970 |
| 185 | 185 | @ content TEXT -- Content intended to be concealed |
| 186 | | -@ ); |
| 186 | +@ ) WITHOUT ROWID; |
| 187 | 187 | @ |
| 188 | 188 | @ -- The application ID helps the unix "file" command to identify the |
| 189 | 189 | @ -- database as a fossil repository. |
| 190 | 190 | @ PRAGMA application_id=252006673; |
| 191 | 191 | ; |
| | @@ -250,12 +250,12 @@ |
| 250 | 250 | @ CREATE TABLE plink( |
| 251 | 251 | @ pid INTEGER REFERENCES blob, -- Parent manifest |
| 252 | 252 | @ cid INTEGER REFERENCES blob, -- Child manifest |
| 253 | 253 | @ isprim BOOLEAN, -- pid is the primary parent of cid |
| 254 | 254 | @ mtime DATETIME, -- the date/time stamp on cid. Julian day. |
| 255 | | -@ UNIQUE(pid, cid) |
| 256 | | -@ ); |
| 255 | +@ PRIMARY KEY(pid, cid) |
| 256 | +@ ) WITHOUT ROWID; |
| 257 | 257 | @ CREATE INDEX plink_i2 ON plink(cid,pid); |
| 258 | 258 | @ |
| 259 | 259 | @ -- A "leaf" checkin is a checkin that has no children in the same |
| 260 | 260 | @ -- branch. The set of all leaves is easily computed with a join, |
| 261 | 261 | @ -- between the plink and tagxref tables, but it is a slower join for |
| | @@ -356,12 +356,12 @@ |
| 356 | 356 | @ srcid INTEGER REFERENCES blob, -- Artifact of tag. 0 for propagated tags |
| 357 | 357 | @ origid INTEGER REFERENCES blob, -- check-in holding propagated tag |
| 358 | 358 | @ value TEXT, -- Value of the tag. Might be NULL. |
| 359 | 359 | @ mtime TIMESTAMP, -- Time of addition or removal. Julian day |
| 360 | 360 | @ rid INTEGER REFERENCE blob, -- Artifact tag is applied to |
| 361 | | -@ UNIQUE(rid, tagid) |
| 362 | | -@ ); |
| 361 | +@ PRIMARY KEY(rid, tagid) |
| 362 | +@ ) WITHOUT ROWID; |
| 363 | 363 | @ CREATE INDEX tagxref_i1 ON tagxref(tagid, mtime); |
| 364 | 364 | @ |
| 365 | 365 | @ -- When a hyperlink occurs from one artifact to another (for example |
| 366 | 366 | @ -- when a check-in comment refers to a ticket) an entry is made in |
| 367 | 367 | @ -- the following table for that hyperlink. This table is used to |
| | @@ -370,12 +370,12 @@ |
| 370 | 370 | @ CREATE TABLE backlink( |
| 371 | 371 | @ target TEXT, -- Where the hyperlink points to |
| 372 | 372 | @ srctype INT, -- 0: check-in 1: ticket 2: wiki |
| 373 | 373 | @ srcid INT, -- rid for checkin or wiki. tkt_id for ticket. |
| 374 | 374 | @ mtime TIMESTAMP, -- time that the hyperlink was added. Julian day. |
| 375 | | -@ UNIQUE(target, srctype, srcid) |
| 376 | | -@ ); |
| 375 | +@ PRIMARY KEY(target, srctype, srcid) |
| 376 | +@ ) WITHOUT ROWID; |
| 377 | 377 | @ CREATE INDEX backlink_src ON backlink(srcid, srctype); |
| 378 | 378 | @ |
| 379 | 379 | @ -- Each attachment is an entry in the following table. Only |
| 380 | 380 | @ -- the most recent attachment (identified by the D card) is saved. |
| 381 | 381 | @ -- |
| 382 | 382 | |