create table if not exists ValidPaths (
    id               integer primary key autoincrement not null,
    path             text unique not null,
    hash             text not null,
    registrationTime integer not null,
    deriver          text,
    narSize          integer
);

create table if not exists Refs (
    referrer  integer not null,
    reference integer not null,
    primary key (referrer, reference),
    foreign key (referrer) references ValidPaths(id) on delete cascade,
    foreign key (reference) references ValidPaths(id) on delete restrict
);

create index if not exists IndexReferrer on Refs(referrer);
create index if not exists IndexReference on Refs(reference);

-- Paths can refer to themselves, causing a tuple (N, N) in the Refs
-- table.  This causes a deletion of the corresponding row in
-- ValidPaths to cause a foreign key constraint violation (due to `on
-- delete restrict' on the `reference' column).  Therefore, explicitly
-- get rid of self-references.
create trigger if not exists DeleteSelfRefs before delete on ValidPaths
  begin
    delete from Refs where referrer = old.id and reference = old.id;
  end;

create table if not exists DerivationOutputs (
    drv  integer not null,
    id   text not null, -- symbolic output id, usually "out"
    path text not null,
    primary key (drv, id),
    foreign key (drv) references ValidPaths(id) on delete cascade
);

create index if not exists IndexDerivationOutputs on DerivationOutputs(path);

create table if not exists FailedPaths (
    path text primary key not null,
    time integer not null
);
d><td class='form'><form class='right' method='get' action='/guix/log/etc/disarchive-manifest.scm'>
<input type='hidden' name='id' value='24f18482d3d57a49f0711e0c42f1e0ef5c1549df'/><select name='qt'>
<option value='grep'>log msg</option>
<option value='author'>author</option>
<option value='committer'>committer</option>
<option value='range'>range</option>
</select>
<input class='txt' type='search' size='10' name='q' value=''/>
<input type='submit' value='search'/>
</form>
</td></tr></table>
<div class='path'>path: <a href='/guix/log/?id=24f18482d3d57a49f0711e0c42f1e0ef5c1549df'>root</a>/<a href='/guix/log/etc?id=24f18482d3d57a49f0711e0c42f1e0ef5c1549df'>etc</a>/<a href='/guix/log/etc/disarchive-manifest.scm?id=24f18482d3d57a49f0711e0c42f1e0ef5c1549df'>disarchive-manifest.scm</a></div><div class='content'><table class='list nowrap'><tr class='nohover'><th class='left'>Age</th><th class='left'>Commit message (<a href='/guix/log/etc/disarchive-manifest.scm?id=24f18482d3d57a49f0711e0c42f1e0ef5c1549df&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th></tr>
<tr><td><span title='2022-08-06 23:14:41 +0200'>2022-08-06</span></td><td><a href='/guix/commit/etc/disarchive-manifest.scm?id=eab5366e679c149cf0a5abeb9a196700b171d9da'>disarchive-manifest: Exclude the Chromium tarball.</a><span class='msg-avail'>...<span class='msg-tooltip'>* etc/disarchive-manifest.scm (disarchive-collection): Exclude
"chromium-" tarballs.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2022-08-05 15:28:02 +0200'>2022-08-05</span></td><td><a href='/guix/commit/etc/disarchive-manifest.scm?id=6d4a0ccecb58c62a95f7f36fa2f4fa53dd52312e'>disarchive-manifest: Filter out origins without a hash.</a><span class='msg-avail'>...<span class='msg-tooltip'>* etc/disarchive-manifest.scm (disarchive-collection): Filter out
origins with a phony hash.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2022-08-05 00:14:29 +0200'>2022-08-05</span></td><td><a href='/guix/commit/etc/disarchive-manifest.scm?id=2acffd56a58c01785ea6ea738b79991c0685d364'>disarchive-manifest: Handle tar.xz archives.</a><span class='msg-avail'>...<span class='msg-tooltip'>* etc/disarchive-manifest.scm (tarball-origin?): Add ".tar.xz".
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2021-10-09 01:02:18 +0200'>2021-10-09</span></td><td><a href='/guix/commit/etc/disarchive-manifest.scm?id=2ad1ef844632b7605ad6dd362e947a122a0a3925'>disarchive-manifest: Provide valid 'version' string.</a><span class='msg-avail'>...<span class='msg-tooltip'>* etc/disarchive-manifest.scm &lt;top level&gt;: Turn 'version' field into a
string.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2021-09-14 11:50:58 +0200'>2021-09-14</span></td><td><a href='/guix/commit/etc/disarchive-manifest.scm?id=98712c14fe3517a48603a12eb2e64db305a54fe5'>etc: Add 'disarchive-manifest.scm'.</a><span class='msg-avail'>...<span class='msg-tooltip'>* etc/disarchive-manifest.scm: New file.
* Makefile.am (EXTRA_DIST): Add it.
</span></span></td><td>Ludovic Courtès</td></tr>
