summaryrefslogtreecommitdiffstats
path: root/src/db/migrations.rs
diff options
context:
space:
mode:
authoraur-build <aur-build@localhost>2026-11-19 17:33:17 +0000
committeraur-build <aur-build@localhost>2026-11-19 17:33:17 +0000
commit4304b0f336ddba7b4ec6780795059ff2066d105b (patch)
tree10edea744a1c2bf3fc363b4dc7f64abac8b1a0d3 /src/db/migrations.rs
parente757979f1a2afdbe7146066345bb9acd19d3b151 (diff)
downloadaur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.tar.gz
aur-build-4304b0f336ddba7b4ec6780795059ff2066d105b.zip
comments: keep only what the code cannot show
Stripped every comment that described what an item does, documented its arguments or fields, or cited the design docs (§n, I-n, m-n, decision n). 2247 comments down to 83. What survives: the section dividers that segment the large modules, the secret-handling warnings, the agent wire-frame directions, and the few notes without which the code they attach to reads as redundant, reorderable, or unsound.
Diffstat (limited to 'src/db/migrations.rs')
-rw-r--r--src/db/migrations.rs15
1 files changed, 0 insertions, 15 deletions
diff --git a/src/db/migrations.rs b/src/db/migrations.rs
index b1954ab..18e9a4b 100644
--- a/src/db/migrations.rs
+++ b/src/db/migrations.rs
@@ -1,4 +1,3 @@
-/// One migration: version number + SQL body.
pub struct Migration {
pub version: u32,
pub name: &'static str,
@@ -268,17 +267,11 @@ BEGIN
END;
"#;
-/// `artifact.build_id` lets the publish step find what `ingest` recorded without
-/// re-scanning the disposable staging directory, so a worker that dies between
-/// ingest and publish resumes cleanly (I5).
const M_0005_ARTIFACT_BUILD: &str = r#"
ALTER TABLE artifact ADD COLUMN build_id TEXT;
CREATE INDEX artifact_by_build ON artifact (build_id);
"#;
-/// §7.2: the approval record is immutable. It is the only proof the system has
-/// of *what a human actually looked at*, so editing it would let a later
-/// attacker retarget a published artifact onto a clean review.
const M_0006_APPROVAL_IMMUTABLE: &str = r#"
CREATE TRIGGER approval_no_update
BEFORE UPDATE ON approval
@@ -293,9 +286,6 @@ BEGIN
END;
"#;
-/// Stage B results, keyed on `(pkgbase, recipe_hash, upstream_tip)` (§5.2).
-/// Re-resolving means cloning an upstream repo and running makepkg, so the answer
-/// is worth keeping; the same key also implements the per-pkgbase cooldown.
const M_0007_STAGE_B_CACHE: &str = r#"
CREATE TABLE stage_b_cache (
pkgbase_id INTEGER NOT NULL REFERENCES pkgbase(id),
@@ -312,10 +302,6 @@ CREATE TABLE stage_b_cache (
CREATE INDEX stage_b_cache_by_pkgbase ON stage_b_cache (pkgbase_id, resolved_at);
"#;
-/// Retention (§15). The rows are never compacted — the schema exists so "which
-/// bytes produced this installed package" stays answerable — but the bytes on disk
-/// cannot be kept forever. So eviction is recorded rather than implied: the
-/// artifact row keeps its digest, size and provenance and gains a `purged_at`.
const M_0008_RETENTION: &str = r#"
ALTER TABLE artifact ADD COLUMN purged_at TEXT;
@@ -348,7 +334,6 @@ pub static MIGRATIONS: &[Migration] = &[
Migration { version: 8, name: "retention", sql: M_0008_RETENTION },
];
-/// Default settings seeded into `settings` (DESIGN.md §11).
pub const DEFAULT_SETTINGS: &[(&str, &str)] = &[
("max_concurrent_builds", "1"),
("build_timeout", "5400"),