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
);
='right' method='get' action='/guix/log/gnu/services/avahi.scm'>
<input type='hidden' name='id' value='0d0fcb6227267fa221011752d5a1b3ed51108947'/><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=0d0fcb6227267fa221011752d5a1b3ed51108947'>root</a>/<a href='/guix/log/gnu?id=0d0fcb6227267fa221011752d5a1b3ed51108947'>gnu</a>/<a href='/guix/log/gnu/services?id=0d0fcb6227267fa221011752d5a1b3ed51108947'>services</a>/<a href='/guix/log/gnu/services/avahi.scm?id=0d0fcb6227267fa221011752d5a1b3ed51108947'>avahi.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/gnu/services/avahi.scm?id=0d0fcb6227267fa221011752d5a1b3ed51108947&amp;showmsg=1'>Expand</a>)</th><th class='left'>Author</th></tr>
<tr><td><span title='2021-11-30 01:08:55 +0100'>2021-11-30</span></td><td><a href='/guix/commit/gnu/services/avahi.scm?id=892f1b7273d57b25940700877a02618fe826cc08'>services: Accept &lt;inferior-package&gt;s in lieu of &lt;package&gt;s.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/services/authentication.scm (fprintd-configuration)
(nslcd-configuration): Substitute file-like objects for package ones.
* gnu/services/cgit.scm (cgit-configuration, opaque-cgit-configuration):
Likewise.
* gnu/services/cups.scm (package-list?, cups-configuration): Likewise.
* gnu/services/dns.scm (verify-knot-configuration)
(ddclient-configuration): Likewise.
* gnu/services/docker.scm (docker-configuration): Likewise.
* gnu/services/file-sharing.scm (transmission-daemon-configuration): Likewise.
* gnu/services/getmail.scm (getmail-configuration): Likewise.
* gnu/services/mail.scm (dovecot-configuration)
(opaque-dovecot-configuration): Likewise.
* gnu/services/messaging.scm (prosody-configuration)
(opaque-prosody-configuration): Likewise.
* gnu/services/monitoring.scm (zabbix-server-configuration)
(zabbix-agent-configuration): Likewise.
* gnu/services/networking.scm (opendht-configuration): Likewise.
* gnu/services/pm.scm (tlp-configuration): Likewise.
* gnu/services/telephony.scm (jami-configuration): Likewise.
* gnu/services/virtualization.scm (libvirt-configuration)
(qemu-guest-agent-configuration): Likewise.
* gnu/services/vpn.scm (openvpn-client-configuration): Likewise.
</span></span></td><td>Tobias Geerinckx-Rice</td></tr>
<tr><td><span title='2021-06-14 18:35:17 +0200'>2021-06-14</span></td><td><a href='/guix/commit/gnu/services/avahi.scm?id=f70c3429ed0064eb4554722b4a60031385fd6785'>services: Remove deprecated service procedures.</a><span class='msg-avail'>...<span class='msg-tooltip'>These service procedures were deprecated in January 2019, for instance
in commit 65a67bf711b14bc7200f6730c0f173375ca12974.

* gnu/services/avahi.scm (avahi-service): Remove.
* gnu/services/base.scm (console-keymap, guix-service)
(guix-publish-service, gpm-service, urandom-seed-service): Remove.
* gnu/services/desktop.scm (upower-service, colord-service): Remove.
* gnu/services/mcron.scm (mcron-service): Remove.
* gnu/services/messaging.scm (bitlbee-service): Remove.
* gnu/services/networking.scm (dhcp-client-service, ntp-service)
(tor-service): Remove.
* gnu/services/xorg.scm (slim-service, gdm-service): Remove.
</span></span></td><td>Ludovic Courtès</td></tr>
<tr><td><span title='2020-12-09 14:13:32 +0100'>2020-12-09</span></td><td><a href='/guix/commit/gnu/services/avahi.scm?id=59a6780f70e138a515dfe9c3b5b5399dbd91c228'>services: avahi: Depend on 'user-processes'.</a><span class='msg-avail'>...<span class='msg-tooltip'>* gnu/services/avahi.scm (avahi-shepherd-service): Add 'user-processes'
to 'requirement'.
</span></span></td><td>Ludovic Courtès</td></tr>
