Fossil SCM

Remove an incorrect foreign key from the mlink table. Many of the other foreign keys are syntactically correct, but Fossil uses numeric 0 instead of NULL to mean "no reference", which is semantically wrong. We should try to fix that at some point, perhaps. Or enhance SQLite so that it is able to interpret 0 values on a FK reference to an INTEGER PRIMARY KEY as if it were a NULL, as an option. Maybe.

drh 2020-05-29 10:32 trunk
Commit 1f5af80047be4589a0d3ab97570f4b2e941781f68c3dd4b5dfbc23e11efa38f1
1 file changed +1 -1
+1 -1
--- src/schema.c
+++ src/schema.c
@@ -266,11 +266,11 @@
266266
@ mid INTEGER, -- Check-in that contains fid
267267
@ fid INTEGER, -- New file content. 0 if deleted
268268
@ pmid INTEGER, -- Check-in that contains pid
269269
@ pid INTEGER, -- Prev file content. 0 if new. -1 merge
270270
@ fnid INTEGER REFERENCES filename, -- Name of the file
271
-@ pfnid INTEGER REFERENCES filename, -- Previous name. 0 if unchanged
271
+@ pfnid INTEGER, -- Previous name. 0 if unchanged
272272
@ mperm INTEGER, -- File permissions. 1==exec
273273
@ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary
274274
@ );
275275
@ CREATE INDEX mlink_i1 ON mlink(mid);
276276
@ CREATE INDEX mlink_i2 ON mlink(fnid);
277277
--- src/schema.c
+++ src/schema.c
@@ -266,11 +266,11 @@
266 @ mid INTEGER, -- Check-in that contains fid
267 @ fid INTEGER, -- New file content. 0 if deleted
268 @ pmid INTEGER, -- Check-in that contains pid
269 @ pid INTEGER, -- Prev file content. 0 if new. -1 merge
270 @ fnid INTEGER REFERENCES filename, -- Name of the file
271 @ pfnid INTEGER REFERENCES filename, -- Previous name. 0 if unchanged
272 @ mperm INTEGER, -- File permissions. 1==exec
273 @ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary
274 @ );
275 @ CREATE INDEX mlink_i1 ON mlink(mid);
276 @ CREATE INDEX mlink_i2 ON mlink(fnid);
277
--- src/schema.c
+++ src/schema.c
@@ -266,11 +266,11 @@
266 @ mid INTEGER, -- Check-in that contains fid
267 @ fid INTEGER, -- New file content. 0 if deleted
268 @ pmid INTEGER, -- Check-in that contains pid
269 @ pid INTEGER, -- Prev file content. 0 if new. -1 merge
270 @ fnid INTEGER REFERENCES filename, -- Name of the file
271 @ pfnid INTEGER, -- Previous name. 0 if unchanged
272 @ mperm INTEGER, -- File permissions. 1==exec
273 @ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary
274 @ );
275 @ CREATE INDEX mlink_i1 ON mlink(mid);
276 @ CREATE INDEX mlink_i2 ON mlink(fnid);
277

Keyboard Shortcuts

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