diff --git a/.sqlx/query-14a89a45dfd88b0445de5759e5dcd6eca6ba43acadf742ac66a743606a5d332d.json b/.sqlx/query-14a89a45dfd88b0445de5759e5dcd6eca6ba43acadf742ac66a743606a5d332d.json
new file mode 100644
index 00000000..fd0603c8
--- /dev/null
+++ b/.sqlx/query-14a89a45dfd88b0445de5759e5dcd6eca6ba43acadf742ac66a743606a5d332d.json
@@ -0,0 +1,31 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n SELECT (SELECT count(*) FROM oci_manifest\n WHERE repository_id = $1 AND image = $2) AS \"manifests!\",\n (SELECT count(*) FROM oci_tag\n WHERE repository_id = $1 AND image = $2) AS \"tags!\"\n ",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "manifests!",
+ "type_info": "Int8",
+ "origin": "Expression"
+ },
+ {
+ "ordinal": 1,
+ "name": "tags!",
+ "type_info": "Int8",
+ "origin": "Expression"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Int8",
+ "Text"
+ ]
+ },
+ "nullable": [
+ null,
+ null
+ ]
+ },
+ "hash": "14a89a45dfd88b0445de5759e5dcd6eca6ba43acadf742ac66a743606a5d332d"
+}
diff --git a/.sqlx/query-8c2603f0e4ec470f7d6774f03a8eb01652b0de2346cb411eded082f59a4ae70d.json b/.sqlx/query-8c2603f0e4ec470f7d6774f03a8eb01652b0de2346cb411eded082f59a4ae70d.json
new file mode 100644
index 00000000..73e2002b
--- /dev/null
+++ b/.sqlx/query-8c2603f0e4ec470f7d6774f03a8eb01652b0de2346cb411eded082f59a4ae70d.json
@@ -0,0 +1,32 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n SELECT (SELECT count(*) FROM oci_manifest m\n WHERE m.repository_id = ($1::bigint[])[$3::int] AND m.image = $2\n AND NOT EXISTS (\n SELECT FROM oci_manifest h\n WHERE h.repository_id = ANY(($1::bigint[])[1:$3::int - 1])\n AND h.image = $2 AND h.digest = m.digest)) AS \"manifests!\",\n (SELECT count(*) FROM oci_tag t\n WHERE t.repository_id = ($1::bigint[])[$3::int] AND t.image = $2\n AND NOT EXISTS (\n SELECT FROM oci_tag h\n WHERE h.repository_id = ANY(($1::bigint[])[1:$3::int - 1])\n AND h.image = $2 AND h.tag = t.tag)) AS \"tags!\"\n ",
+ "describe": {
+ "columns": [
+ {
+ "ordinal": 0,
+ "name": "manifests!",
+ "type_info": "Int8",
+ "origin": "Expression"
+ },
+ {
+ "ordinal": 1,
+ "name": "tags!",
+ "type_info": "Int8",
+ "origin": "Expression"
+ }
+ ],
+ "parameters": {
+ "Left": [
+ "Int8Array",
+ "Text",
+ "Int4"
+ ]
+ },
+ "nullable": [
+ null,
+ null
+ ]
+ },
+ "hash": "8c2603f0e4ec470f7d6774f03a8eb01652b0de2346cb411eded082f59a4ae70d"
+}
diff --git a/.sqlx/query-c6dd56d4c99e21704ae5c6ca33814d02c0e21a19d79aefc4e950f9cd63b23bee.json b/.sqlx/query-c6dd56d4c99e21704ae5c6ca33814d02c0e21a19d79aefc4e950f9cd63b23bee.json
deleted file mode 100644
index 28704076..00000000
--- a/.sqlx/query-c6dd56d4c99e21704ae5c6ca33814d02c0e21a19d79aefc4e950f9cd63b23bee.json
+++ /dev/null
@@ -1,127 +0,0 @@
-{
- "db_name": "PostgreSQL",
- "query": "\n SELECT m.digest, m.media_type, m.artifact_type, m.subject_digest, m.size,\n m.summary, m.created_at, m.last_pulled_at,\n coalesce(array_agg(t.tag ORDER BY t.tag) FILTER (WHERE t.tag IS NOT NULL),\n '{}') AS \"tags!\",\n ARRAY(SELECT r.digest FROM oci_manifest_ref r\n WHERE r.manifest_id = m.id AND r.kind = 'manifest'\n ORDER BY r.digest) AS \"children!\"\n FROM oci_manifest m\n LEFT JOIN oci_tag t ON t.manifest_id = m.id\n WHERE m.repository_id = $1 AND m.image = $2\n GROUP BY m.id\n ORDER BY m.created_at DESC, m.digest\n ",
- "describe": {
- "columns": [
- {
- "ordinal": 0,
- "name": "digest",
- "type_info": "Text",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "digest"
- }
- }
- },
- {
- "ordinal": 1,
- "name": "media_type",
- "type_info": "Text",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "media_type"
- }
- }
- },
- {
- "ordinal": 2,
- "name": "artifact_type",
- "type_info": "Text",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "artifact_type"
- }
- }
- },
- {
- "ordinal": 3,
- "name": "subject_digest",
- "type_info": "Text",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "subject_digest"
- }
- }
- },
- {
- "ordinal": 4,
- "name": "size",
- "type_info": "Int8",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "size"
- }
- }
- },
- {
- "ordinal": 5,
- "name": "summary",
- "type_info": "Jsonb",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "summary"
- }
- }
- },
- {
- "ordinal": 6,
- "name": "created_at",
- "type_info": "Timestamptz",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "created_at"
- }
- }
- },
- {
- "ordinal": 7,
- "name": "last_pulled_at",
- "type_info": "Timestamptz",
- "origin": {
- "Table": {
- "table": "oci_manifest",
- "name": "last_pulled_at"
- }
- }
- },
- {
- "ordinal": 8,
- "name": "tags!",
- "type_info": "TextArray",
- "origin": "Expression"
- },
- {
- "ordinal": 9,
- "name": "children!",
- "type_info": "TextArray",
- "origin": "Expression"
- }
- ],
- "parameters": {
- "Left": [
- "Int8",
- "Text"
- ]
- },
- "nullable": [
- false,
- false,
- true,
- true,
- false,
- false,
- false,
- true,
- null,
- null
- ]
- },
- "hash": "c6dd56d4c99e21704ae5c6ca33814d02c0e21a19d79aefc4e950f9cd63b23bee"
-}
diff --git a/.sqlx/query-edc8c59bd5d1f33414e34a9d826d26dfbfd141d2487c26b4fedb5da3b60dee99.json b/.sqlx/query-edc8c59bd5d1f33414e34a9d826d26dfbfd141d2487c26b4fedb5da3b60dee99.json
new file mode 100644
index 00000000..4be9b6c8
--- /dev/null
+++ b/.sqlx/query-edc8c59bd5d1f33414e34a9d826d26dfbfd141d2487c26b4fedb5da3b60dee99.json
@@ -0,0 +1,104 @@
+{
+ "db_name": "PostgreSQL",
+ "query": "\n WITH tagged AS MATERIALIZED (\n -- `untagged_since` is NULL exactly while a tag points at the\n -- manifest (`set_tag`, `delete_tag`).\n SELECT m.*\n FROM oci_manifest m\n WHERE m.repository_id = ($1::bigint[])[$3::int] AND m.image = $2\n AND m.untagged_since IS NULL\n ORDER BY m.created_at DESC, m.digest\n LIMIT $4\n ),\n newest AS MATERIALIZED (\n SELECT m.*\n FROM oci_manifest m\n WHERE m.repository_id = ($1::bigint[])[$3::int] AND m.image = $2\n ORDER BY m.created_at DESC, m.digest\n LIMIT $5\n ),\n listed AS (\n SELECT * FROM tagged\n UNION ALL\n SELECT * FROM newest WHERE id NOT IN (SELECT id FROM tagged)\n )\n -- The manifest shown for the digest is the first repository's (`s`),\n -- the listed one (`m`) when none before it holds the digest. Both\n -- lateral subqueries run once per listed manifest, by key: a join\n -- would be free to read the table instead.\n SELECT coalesce(s.repository_id, m.repository_id) AS \"repository_id!\",\n m.digest AS \"digest!\",\n coalesce(s.media_type, m.media_type) AS \"media_type!\",\n CASE WHEN s.id IS NULL THEN m.artifact_type ELSE s.artifact_type END\n AS artifact_type,\n CASE WHEN s.id IS NULL THEN m.subject_digest ELSE s.subject_digest END\n AS subject_digest,\n coalesce(s.size, m.size) AS \"size!\",\n coalesce(s.summary, m.summary) AS \"summary!\",\n coalesce(s.created_at, m.created_at) AS \"created_at!\",\n CASE WHEN s.id IS NULL THEN m.last_pulled_at ELSE s.last_pulled_at END\n AS last_pulled_at,\n t.tags AS \"tags!\",\n ARRAY(SELECT r.digest FROM oci_manifest_ref r\n WHERE r.manifest_id = coalesce(s.id, m.id) AND r.kind = 'manifest'\n ORDER BY r.digest) AS \"children!\",\n ARRAY(SELECT (SELECT c.summary FROM oci_manifest c\n WHERE c.repository_id = ANY($1) AND c.image = $2\n AND c.digest = r.digest\n ORDER BY array_position($1, c.repository_id)\n LIMIT 1)\n FROM oci_manifest_ref r\n WHERE r.manifest_id = coalesce(s.id, m.id) AND r.kind = 'manifest'\n ORDER BY r.digest) AS \"child_summaries!: Vec