diff options
Diffstat (limited to 'src/db/migrations.rs')
| -rw-r--r-- | src/db/migrations.rs | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/src/db/migrations.rs b/src/db/migrations.rs index 7adc69c..2e552f2 100644 --- a/src/db/migrations.rs +++ b/src/db/migrations.rs @@ -5,7 +5,7 @@ pub struct Migration { pub sql: &'static str, } -const M_0001_CORE: &str = r#" +const M_0001_CORE: &str = r" -- The single repo we publish. Exactly one row. CREATE TABLE repo ( id INTEGER PRIMARY KEY, @@ -170,9 +170,9 @@ CREATE TABLE package ( state TEXT NOT NULL DEFAULT 'in_index' -- in_index | removed ); CREATE INDEX package_by_name ON package (repo_id, name, state); -"#; +"; -const M_0002_BUILD: &str = r#" +const M_0002_BUILD: &str = r" CREATE TABLE build ( id TEXT PRIMARY KEY, -- deterministic intent hash pkgbase_id INTEGER NOT NULL REFERENCES pkgbase(id), @@ -209,7 +209,7 @@ CREATE TABLE build_step ( finished_at TEXT, PRIMARY KEY (build_id, step) ); -"#; +"; const M_0003_NOTICES: &str = r#" -- "something changed but nothing is publishable". @@ -253,7 +253,7 @@ CREATE TABLE dep_edge ( ); "#; -const M_0004_TRIGGERS: &str = r#" +const M_0004_TRIGGERS: &str = r" -- The audit log is append-only. CREATE TRIGGER audit_no_update BEFORE UPDATE ON audit @@ -266,14 +266,14 @@ BEFORE DELETE ON audit BEGIN SELECT RAISE(ABORT, 'audit log is append-only: deletes are forbidden'); END; -"#; +"; -const M_0005_ARTIFACT_BUILD: &str = r#" +const M_0005_ARTIFACT_BUILD: &str = r" ALTER TABLE artifact ADD COLUMN build_id TEXT; CREATE INDEX artifact_by_build ON artifact (build_id); -"#; +"; -const M_0006_APPROVAL_IMMUTABLE: &str = r#" +const M_0006_APPROVAL_IMMUTABLE: &str = r" CREATE TRIGGER approval_no_update BEFORE UPDATE ON approval BEGIN @@ -285,9 +285,9 @@ BEFORE DELETE ON approval BEGIN SELECT RAISE(ABORT, 'approval records are immutable'); END; -"#; +"; -const M_0007_STAGE_B_CACHE: &str = r#" +const M_0007_STAGE_B_CACHE: &str = r" CREATE TABLE stage_b_cache ( pkgbase_id INTEGER NOT NULL REFERENCES pkgbase(id), recipe_hash TEXT NOT NULL, @@ -301,7 +301,7 @@ CREATE TABLE stage_b_cache ( ); CREATE INDEX stage_b_cache_by_pkgbase ON stage_b_cache (pkgbase_id, resolved_at); -"#; +"; const M_0008_RETENTION: &str = r#" ALTER TABLE artifact ADD COLUMN purged_at TEXT; |
