diff --git a/crates/turborepo-db/migrations/20240828183512_initial_tables.sql b/crates/turborepo-db/migrations/20240828183512_initial_tables.sql index 3f556c50921d2..e250cad5fff6d 100644 --- a/crates/turborepo-db/migrations/20240828183512_initial_tables.sql +++ b/crates/turborepo-db/migrations/20240828183512_initial_tables.sql @@ -60,9 +60,3 @@ CREATE TABLE IF NOT EXISTS tasks ( exit_code INTEGER, logs TEXT NOT NULL ); - -CREATE TABLE IF NOT EXISTS task_dependencies ( - id INTEGER PRIMARY KEY AUTOINCREMENT, - dependent_id INTEGER NOT NULL, - dependency_id INTEGER NOT NULL -); \ No newline at end of file diff --git a/crates/turborepo-db/src/lib.rs b/crates/turborepo-db/src/lib.rs index 4fb124a4d91b1..36f47e0c4662a 100644 --- a/crates/turborepo-db/src/lib.rs +++ b/crates/turborepo-db/src/lib.rs @@ -199,8 +199,10 @@ impl DatabaseHandle { end_time, cache_status, exit_code, - logs - ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9)", + logs, + dependencies, + dependents + ) VALUES ($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11)", ) .bind(id.to_string()) .bind(&summary.name) @@ -211,6 +213,8 @@ impl DatabaseHandle { .bind(serde_json::to_string(&summary.cache)?) .bind(summary.exit_code) .bind(&summary.logs) + .bind(serde_json::to_string(&summary.dependencies)?) + .bind(serde_json::to_string(&summary.dependents)?) .execute(&self.pool) .await?;