-
Notifications
You must be signed in to change notification settings - Fork 0
/
schema.sql
32 lines (29 loc) · 971 Bytes
/
schema.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
create table repositories (
name text not null,
created_at integer not null default current_timestamp,
primary key (name)
);
create table manifests (
repository text not null,
digest text not null,
created_at integer not null default current_timestamp,
updated_at integer not null default current_timestamp,
primary key (repository, digest),
foreign key (repository) references repositories (name)
);
create table tags (
repository text not null,
tag text not null,
digest text not null,
created_at integer not null default current_timestamp,
primary key (repository, tag),
foreign key (repository) references repositories (name),
foreign key (repository, digest) references manifests (repository, digest)
);
create table blobs (
repository text not null,
digest text not null,
size integer not null,
created_at integer not null default current_timestamp,
primary key (repository, digest)
);