diff --git a/docs/graph/_images/db-schema.dot b/docs/graph/_images/db-schema.dot
new file mode 100644
index 0000000..d242dfb
--- /dev/null
+++ b/docs/graph/_images/db-schema.dot
@@ -0,0 +1,109 @@
+digraph g {
+graph [
+rankdir = "LR",
+concentrate = true,
+ratio = auto
+];
+node [
+fontsize = "10",
+shape = record
+];
+edge [
+];
+
+"content" [shape = plaintext, label = <
| \N | |
| sha1 | string | | | |
| sha1_git | string | | | |
| sha256 | string | | | |
| blake2s256 | string | | | |
| length | bigint | | | |
| status | string | | | |
> ];
+
+"skipped_content" [shape = plaintext, label = < | \N | |
| sha1 | string | | | |
| sha1_git | string | | | |
| sha256 | string | | | |
| blake2s256 | string | | | |
| length | bigint | | | |
| status | string | | | |
| reason | string | | | |
> ];
+
+"directory" [shape = plaintext, label = < > ];
+
+"directory_entry" [shape = plaintext, label = < | \N | |
| directory_id | string | | | |
| name | binary | | | |
| type | string | | | |
| target | string | | | |
| perms | smallint | | | |
> ];
+
+"origin" [shape = plaintext, label = < > ];
+
+"origin_visit" [shape = plaintext, label = < | \N | |
| origin | string | | | |
| visit | bigint | | | |
| date | timestamp with time zone | | | |
| type | string | | | |
> ];
+
+"origin_visit_status" [shape = plaintext, label = < | \N | |
| origin | string | | | |
| visit | bigint | | | |
| date | timestamp with time zone | | | |
| type | string | | | |
| snapshot | string | | | |
| status | string | | | |
> ];
+
+"release" [shape = plaintext, label = < | \N | |
| id | string | | | |
| target | string | | | |
| date | timestamp with time zone | | | |
| date_offset | smallint | | | |
| name | binary | | | |
| author | binary | | | |
| target_type | string | | | |
> ];
+
+"revision" [shape = plaintext, label = < | \N | |
| id | string | | | |
| date | timestamp with time zone | | | |
| date_offset | smallint | | | |
| committer_date | timestamp with time zone | | | |
| committer_date_offset | smallint | | | |
| type | string | | | |
| directory | string | | | |
| message | binary | | | |
| author | binary | | | |
| committer | binary | | | |
> ];
+
+"revision_history" [shape = plaintext, label = < | \N | |
| id | string | | | |
| parent_id | string | | | |
| parent_rank | integer | | | |
> ];
+
+
+"snapshot" [shape = plaintext, label = < > ];
+
+"snapshot_branch" [shape = plaintext, label = < | \N | |
| snapshot_id | string | | | |
| name | binary | | | |
| target | string | | | |
| target_type | string | | | |
> ];
+
+subgraph "logical_grouping" {
+ style = rounded;
+ bgcolor = gray95;
+ color = gray;
+
+ subgraph cluster_content {
+ label = <content>;
+ content;
+ skipped_content;
+ }
+
+ subgraph cluster_directory {
+ label = <directories>;
+ directory;
+ directory_entry;
+ }
+
+ subgraph cluster_revision {
+ label = <revisions>;
+ revision;
+ revision_history;
+ }
+
+ subgraph cluster_release {
+ label = <releases>;
+ release;
+ }
+
+ subgraph cluster_snapshots {
+ label = <snapshots>;
+ snapshot;
+ snapshot_branch;
+ }
+
+ subgraph cluster_origins {
+ label = <origins>;
+ origin;
+ origin_visit;
+ origin_visit_status;
+ }
+
+ {
+ edge [style = dashed];
+
+ # "rtcolN" identifies the N-th row (1-based) in a table, as a source
+ # "ltcolN" identifies the N-th row (1-based) in a table, as a destination
+ "snapshot_branch":rtcol3 -> "release":ltcol1;
+ "snapshot_branch":rtcol3 -> "revision":ltcol1;
+ # "snapshot_branch":rtcol3 -> "directory":ltcol1;
+ # "snapshot_branch":rtcol3 -> "content":ltcol2;
+
+ "directory_entry":rtcol1 -> "directory":ltcol1;
+
+ "directory_entry":rtcol4 -> "directory":ltcol1;
+ "directory_entry":rtcol4 -> "content":ltcol2;
+ "directory_entry":rtcol4 -> "skipped_content":ltcol2;
+ "directory_entry":rtcol4 -> "revision":ltcol1;
+
+ "release":rtcol2 -> "revision":ltcol1;
+ "revision":rtcol7 -> "directory":ltcol1;
+ "revision_history":rtcol2 -> "revision":ltcol1;
+
+ "origin_visit":rtcol1 -> "origin":ltcol1;
+ "origin_visit_status":rtcol1 -> "origin":ltcol1;
+ "revision_history":rtcol1 -> "revision":ltcol1;
+ "origin_visit_status":rtcol5 -> "snapshot":ltcol1;
+ "snapshot_branch":rtcol1 -> "snapshot":ltcol1;
+
+ }
+}
+}
diff --git a/docs/graph/_images/db-schema.svg b/docs/graph/_images/db-schema.svg
index 2f8dff7..55ca012 100644
--- a/docs/graph/_images/db-schema.svg
+++ b/docs/graph/_images/db-schema.svg
@@ -1,522 +1,516 @@
-
-