MCPcopy Create free account
hub / github.com/ScriptedAlchemy/tracedecay / apply_v3

Function apply_v3

tests/storage_suite/migration_test.rs:409–419  ·  view source on GitHub ↗

Applies the V3 additions on top of V2 (complexity columns).

(conn: &Connection)

Source from the content-addressed store, hash-verified

407
408/// Applies the V3 additions on top of V2 (complexity columns).
409async fn apply_v3(conn: &Connection) {
410 conn.execute_batch(
411 "ALTER TABLE nodes ADD COLUMN branches INTEGER NOT NULL DEFAULT 0;
412 ALTER TABLE nodes ADD COLUMN loops INTEGER NOT NULL DEFAULT 0;
413 ALTER TABLE nodes ADD COLUMN returns INTEGER NOT NULL DEFAULT 0;
414 ALTER TABLE nodes ADD COLUMN max_nesting INTEGER NOT NULL DEFAULT 0;",
415 )
416 .await
417 .expect("failed to apply v3");
418 set_user_version(conn, 3).await;
419}
420
421/// Applies the V4 additions on top of V3 (safety metric columns).
422async fn apply_v4(conn: &Connection) {

Callers 3

test_migrate_from_v3Function · 0.85
test_migrate_from_v4Function · 0.85

Calls 1

set_user_versionFunction · 0.70

Tested by

no test coverage detected