Fossil SCM

Make more use of WITHOUT ROWID tables in the main schema.

drh 2024-12-06 13:37 trunk
Commit b8011bf50817c71ac843e405a5799e1e26ffe06cedd29aee85e3afda21241cdb
1 file changed +7 -7
+7 -7
--- src/schema.c
+++ src/schema.c
@@ -28,11 +28,11 @@
2828
@ -- ~/.fossil file and that stores information about the users setup.
2929
@ --
3030
@ CREATE TABLE global_config(
3131
@ name TEXT PRIMARY KEY,
3232
@ value TEXT
33
-@ );
33
+@ ) WITHOUT ROWID;
3434
@
3535
@ -- Identifier for this file type.
3636
@ -- The integer is the same as 'FSLG'.
3737
@ PRAGMA application_id=252006675;
3838
;
@@ -138,11 +138,11 @@
138138
@ CREATE TABLE config(
139139
@ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry
140140
@ value CLOB, -- Content of the named parameter
141141
@ mtime DATE, -- last modified. seconds since 1970
142142
@ CHECK( typeof(name)='text' AND length(name)>=1 )
143
-@ );
143
+@ ) WITHOUT ROWID;
144144
@
145145
@ -- Artifacts that should not be processed are identified in the
146146
@ -- "shun" table. Artifacts that are control-file forgeries or
147147
@ -- spam or artifacts whose contents violate administrative policy
148148
@ -- can be shunned in order to prevent them from contaminating
@@ -151,14 +151,14 @@
151151
@ -- Shunned artifacts do not exist in the blob table. Hence they
152152
@ -- have not artifact ID (rid) and we thus must store their full
153153
@ -- UUID.
154154
@ --
155155
@ CREATE TABLE shun(
156
-@ uuid UNIQUE, -- UUID of artifact to be shunned. Canonical form
156
+@ uuid TEXT PRIMARY KEY,-- UUID of artifact to be shunned. Canonical form
157157
@ mtime DATE, -- When added. seconds since 1970
158158
@ scom TEXT -- Optional text explaining why the shun occurred
159
-@ );
159
+@ ) WITHOUT ROWID;
160160
@
161161
@ -- Artifacts that should not be pushed are stored in the "private"
162162
@ -- table. Private artifacts are omitted from the "unclustered" and
163163
@ -- "unsent" tables.
164164
@ --
@@ -193,11 +193,11 @@
193193
@ --
194194
@ CREATE TABLE concealed(
195195
@ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
196196
@ mtime DATE, -- Time created. Seconds since 1970
197197
@ content TEXT -- Content intended to be concealed
198
-@ );
198
+@ ) WITHOUT ROWID;
199199
@
200200
@ -- The application ID helps the unix "file" command to identify the
201201
@ -- database as a fossil repository.
202202
@ PRAGMA application_id=252006673;
203203
;
@@ -528,11 +528,11 @@
528528
** The schema for the local FOSSIL database file found at the root
529529
** of every check-out. This database contains the complete state of
530530
** the check-out. See also the addendum in zLocalSchemaVmerge[].
531531
*/
532532
const char zLocalSchema[] =
533
-@ -- The VVAR table holds miscellanous information about the local database
533
+@ -- The VVAR table holds miscellanous information about the local checkout
534534
@ -- in the form of name-value pairs. This is similar to the VAR table
535535
@ -- table in the repository except that this table holds information that
536536
@ -- is specific to the local check-out.
537537
@ --
538538
@ -- Important Variables:
@@ -542,11 +542,11 @@
542542
@ --
543543
@ CREATE TABLE vvar(
544544
@ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry
545545
@ value CLOB, -- Content of the named parameter
546546
@ CHECK( typeof(name)='text' AND length(name)>=1 )
547
-@ );
547
+@ ) WITHOUT ROWID;
548548
@
549549
@ -- Each entry in the vfile table represents a single file in the
550550
@ -- current check-out.
551551
@ --
552552
@ -- The file.rid field is 0 for files or folders that have been
553553
--- src/schema.c
+++ src/schema.c
@@ -28,11 +28,11 @@
28 @ -- ~/.fossil file and that stores information about the users setup.
29 @ --
30 @ CREATE TABLE global_config(
31 @ name TEXT PRIMARY KEY,
32 @ value TEXT
33 @ );
34 @
35 @ -- Identifier for this file type.
36 @ -- The integer is the same as 'FSLG'.
37 @ PRAGMA application_id=252006675;
38 ;
@@ -138,11 +138,11 @@
138 @ CREATE TABLE config(
139 @ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry
140 @ value CLOB, -- Content of the named parameter
141 @ mtime DATE, -- last modified. seconds since 1970
142 @ CHECK( typeof(name)='text' AND length(name)>=1 )
143 @ );
144 @
145 @ -- Artifacts that should not be processed are identified in the
146 @ -- "shun" table. Artifacts that are control-file forgeries or
147 @ -- spam or artifacts whose contents violate administrative policy
148 @ -- can be shunned in order to prevent them from contaminating
@@ -151,14 +151,14 @@
151 @ -- Shunned artifacts do not exist in the blob table. Hence they
152 @ -- have not artifact ID (rid) and we thus must store their full
153 @ -- UUID.
154 @ --
155 @ CREATE TABLE shun(
156 @ uuid UNIQUE, -- UUID of artifact to be shunned. Canonical form
157 @ mtime DATE, -- When added. seconds since 1970
158 @ scom TEXT -- Optional text explaining why the shun occurred
159 @ );
160 @
161 @ -- Artifacts that should not be pushed are stored in the "private"
162 @ -- table. Private artifacts are omitted from the "unclustered" and
163 @ -- "unsent" tables.
164 @ --
@@ -193,11 +193,11 @@
193 @ --
194 @ CREATE TABLE concealed(
195 @ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
196 @ mtime DATE, -- Time created. Seconds since 1970
197 @ content TEXT -- Content intended to be concealed
198 @ );
199 @
200 @ -- The application ID helps the unix "file" command to identify the
201 @ -- database as a fossil repository.
202 @ PRAGMA application_id=252006673;
203 ;
@@ -528,11 +528,11 @@
528 ** The schema for the local FOSSIL database file found at the root
529 ** of every check-out. This database contains the complete state of
530 ** the check-out. See also the addendum in zLocalSchemaVmerge[].
531 */
532 const char zLocalSchema[] =
533 @ -- The VVAR table holds miscellanous information about the local database
534 @ -- in the form of name-value pairs. This is similar to the VAR table
535 @ -- table in the repository except that this table holds information that
536 @ -- is specific to the local check-out.
537 @ --
538 @ -- Important Variables:
@@ -542,11 +542,11 @@
542 @ --
543 @ CREATE TABLE vvar(
544 @ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry
545 @ value CLOB, -- Content of the named parameter
546 @ CHECK( typeof(name)='text' AND length(name)>=1 )
547 @ );
548 @
549 @ -- Each entry in the vfile table represents a single file in the
550 @ -- current check-out.
551 @ --
552 @ -- The file.rid field is 0 for files or folders that have been
553
--- src/schema.c
+++ src/schema.c
@@ -28,11 +28,11 @@
28 @ -- ~/.fossil file and that stores information about the users setup.
29 @ --
30 @ CREATE TABLE global_config(
31 @ name TEXT PRIMARY KEY,
32 @ value TEXT
33 @ ) WITHOUT ROWID;
34 @
35 @ -- Identifier for this file type.
36 @ -- The integer is the same as 'FSLG'.
37 @ PRAGMA application_id=252006675;
38 ;
@@ -138,11 +138,11 @@
138 @ CREATE TABLE config(
139 @ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry
140 @ value CLOB, -- Content of the named parameter
141 @ mtime DATE, -- last modified. seconds since 1970
142 @ CHECK( typeof(name)='text' AND length(name)>=1 )
143 @ ) WITHOUT ROWID;
144 @
145 @ -- Artifacts that should not be processed are identified in the
146 @ -- "shun" table. Artifacts that are control-file forgeries or
147 @ -- spam or artifacts whose contents violate administrative policy
148 @ -- can be shunned in order to prevent them from contaminating
@@ -151,14 +151,14 @@
151 @ -- Shunned artifacts do not exist in the blob table. Hence they
152 @ -- have not artifact ID (rid) and we thus must store their full
153 @ -- UUID.
154 @ --
155 @ CREATE TABLE shun(
156 @ uuid TEXT PRIMARY KEY,-- UUID of artifact to be shunned. Canonical form
157 @ mtime DATE, -- When added. seconds since 1970
158 @ scom TEXT -- Optional text explaining why the shun occurred
159 @ ) WITHOUT ROWID;
160 @
161 @ -- Artifacts that should not be pushed are stored in the "private"
162 @ -- table. Private artifacts are omitted from the "unclustered" and
163 @ -- "unsent" tables.
164 @ --
@@ -193,11 +193,11 @@
193 @ --
194 @ CREATE TABLE concealed(
195 @ hash TEXT PRIMARY KEY, -- The SHA1 hash of content
196 @ mtime DATE, -- Time created. Seconds since 1970
197 @ content TEXT -- Content intended to be concealed
198 @ ) WITHOUT ROWID;
199 @
200 @ -- The application ID helps the unix "file" command to identify the
201 @ -- database as a fossil repository.
202 @ PRAGMA application_id=252006673;
203 ;
@@ -528,11 +528,11 @@
528 ** The schema for the local FOSSIL database file found at the root
529 ** of every check-out. This database contains the complete state of
530 ** the check-out. See also the addendum in zLocalSchemaVmerge[].
531 */
532 const char zLocalSchema[] =
533 @ -- The VVAR table holds miscellanous information about the local checkout
534 @ -- in the form of name-value pairs. This is similar to the VAR table
535 @ -- table in the repository except that this table holds information that
536 @ -- is specific to the local check-out.
537 @ --
538 @ -- Important Variables:
@@ -542,11 +542,11 @@
542 @ --
543 @ CREATE TABLE vvar(
544 @ name TEXT PRIMARY KEY NOT NULL, -- Primary name of the entry
545 @ value CLOB, -- Content of the named parameter
546 @ CHECK( typeof(name)='text' AND length(name)>=1 )
547 @ ) WITHOUT ROWID;
548 @
549 @ -- Each entry in the vfile table represents a single file in the
550 @ -- current check-out.
551 @ --
552 @ -- The file.rid field is 0 for files or folders that have been
553

Keyboard Shortcuts

Open search /
Next entry (timeline) j
Previous entry (timeline) k
Open focused entry Enter
Show this help ?
Toggle theme Top nav button