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.
Commit
1f5af80047be4589a0d3ab97570f4b2e941781f68c3dd4b5dfbc23e11efa38f1
Parent
8ad5e4690854a81…
1 file changed
+1
-1
+1
-1
| --- src/schema.c | ||
| +++ src/schema.c | ||
| @@ -266,11 +266,11 @@ | ||
| 266 | 266 | @ mid INTEGER, -- Check-in that contains fid |
| 267 | 267 | @ fid INTEGER, -- New file content. 0 if deleted |
| 268 | 268 | @ pmid INTEGER, -- Check-in that contains pid |
| 269 | 269 | @ pid INTEGER, -- Prev file content. 0 if new. -1 merge |
| 270 | 270 | @ 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 | |
| 272 | 272 | @ mperm INTEGER, -- File permissions. 1==exec |
| 273 | 273 | @ isaux BOOLEAN DEFAULT 0 -- TRUE if pmid is the primary |
| 274 | 274 | @ ); |
| 275 | 275 | @ CREATE INDEX mlink_i1 ON mlink(mid); |
| 276 | 276 | @ CREATE INDEX mlink_i2 ON mlink(fnid); |
| 277 | 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 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 |