488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
|
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
|
-
+
|
# define TAG_PARENT 10 /* Change to parentage on a check-in */
# define TAG_NOTE 11 /* Extra text appended to a check-in comment */
#endif
/*
** The schema for the local FOSSIL database file found at the root
** of every check-out. This database contains the complete state of
** the checkout.
** the checkout. See also the addendum in zLocalSchemaVmerge[].
*/
const char zLocalSchema[] =
@ -- The VVAR table holds miscellanous information about the local database
@ -- in the form of name-value pairs. This is similar to the VAR table
@ -- table in the repository except that this table holds information that
@ -- is specific to the local checkout.
@ --
|
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
|
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
|
+
+
+
+
+
+
+
+
+
+
+
-
+
+
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
|
@ mrid INTEGER, -- Based on this record due to a merge
@ mtime INTEGER, -- Mtime of file on disk. sec since 1970
@ pathname TEXT, -- Full pathname relative to root
@ origname TEXT, -- Original pathname. NULL if unchanged
@ UNIQUE(pathname,vid)
@ );
@
@ -- Identifier for this file type.
@ -- The integer is the same as 'FSLC'.
@ PRAGMA application_id=252006674;
;
/* Additional local database initialization following the schema
** enhancement of 2019-01-19, in which the mhash column was added
** to vmerge.
*/
const char zLocalSchemaVmerge[] =
@ -- This table holds a record of uncommitted merges in the local
@ -- file tree. If a VFILE entry with id has merged with another
@ -- record, there is an entry in this table with (id,merge) where
@ -- merge is the RECORD table entry that the file merged against.
@ -- An id of 0 or <-3 here means the version record itself. When
@ -- id==(-1) that is a cherrypick merge, id==(-2) that is a
@ -- backout merge and id==(-4) is a integrate merge.
@ --
@
@ CREATE TABLE vmerge(
@ id INTEGER REFERENCES vfile, -- VFILE entry that has been merged
@ merge INTEGER, -- Merged with this record
@ UNIQUE(id, merge)
@ mhash TEXT -- SHA1/SHA3 hash for merge object
@ );
@ CREATE UNIQUE INDEX vmergex1 ON vmerge(id,mhash);
@
@ -- Identifier for this file type.
@ -- The integer is the same as 'FSLC'.
@ PRAGMA application_id=252006674;
@ -- The following trigger will prevent older versions of Fossil that
@ -- do not know about the new vmerge.mhash column from updating the
@ -- vmerge table. This must be done with a trigger, since legacy Fossil
@ -- uses INSERT OR IGNORE to update vmerge, and the OR IGNORE will cause
@ -- a NOT NULL constraint to be silently ignored.
@
@ CREATE TRIGGER vmerge_ck1 AFTER INSERT ON vmerge
@ WHEN new.mhash IS NULL BEGIN
@ SELECT raise(FAIL,
@ 'trying to update a newer checkout with an older version of Fossil');
@ END;
@
;
/*
** The following table holds information about forum posts. It
** is created on-demand whenever the manifest parser encounters
** a forum-post artifact.
*/
|