mirror of
https://github.com/NixOS/nix
synced 2025-06-30 07:33:16 +02:00
* Convert the Nix database to SQLite.
This commit is contained in:
parent
eaaa13ce47
commit
c1a07f9445
6 changed files with 151 additions and 15 deletions
27
src/libstore/schema.sql
Normal file
27
src/libstore/schema.sql
Normal file
|
@ -0,0 +1,27 @@
|
|||
pragma foreign_keys = on;
|
||||
|
||||
create table if not exists ValidPaths (
|
||||
path text primary key not null,
|
||||
hash text not null,
|
||||
registrationTime integer not null
|
||||
);
|
||||
|
||||
create table if not exists Refs (
|
||||
referrer text not null,
|
||||
reference text not null,
|
||||
primary key (referrer, reference),
|
||||
foreign key (referrer) references ValidPaths(path)
|
||||
on delete cascade
|
||||
deferrable initially deferred,
|
||||
foreign key (reference) references ValidPaths(path)
|
||||
on delete restrict
|
||||
deferrable initially deferred
|
||||
);
|
||||
|
||||
create table if not exists FailedDerivations (
|
||||
path text primary key not null,
|
||||
time integer not null
|
||||
);
|
||||
|
||||
create index IndexReferrer on Refs(referrer);
|
||||
create index IndexReference on Refs(reference);
|
Loading…
Add table
Add a link
Reference in a new issue