From 2f863549f0194fa678e1aa95aaf0e3ea8d067140 Mon Sep 17 00:00:00 2001 From: Zachary Hamm Date: Wed, 7 Aug 2024 16:25:42 -0500 Subject: [PATCH 1/2] fix: remove stray debugging --- lib/dal/src/workspace.rs | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/lib/dal/src/workspace.rs b/lib/dal/src/workspace.rs index b74d4c4da9..79a07d6435 100644 --- a/lib/dal/src/workspace.rs +++ b/lib/dal/src/workspace.rs @@ -116,9 +116,7 @@ impl TryFrom for Workspace { uses_actions_v2: row.try_get("uses_actions_v2")?, timestamp: Timestamp::assemble(created_at, updated_at), token: row.try_get("token")?, - snapshot_version: dbg!(WorkspaceSnapshotGraphDiscriminants::from_str( - &snapshot_version - )?), + snapshot_version: WorkspaceSnapshotGraphDiscriminants::from_str(&snapshot_version)?, }) } } From ad49ed8cf4ca9e33ce19acfd69abf063ff66d3aa Mon Sep 17 00:00:00 2001 From: Zachary Hamm Date: Wed, 7 Aug 2024 16:37:11 -0500 Subject: [PATCH 2/2] fix(dal): fix new workspace --- lib/dal/src/workspace.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/lib/dal/src/workspace.rs b/lib/dal/src/workspace.rs index 79a07d6435..df09c67ada 100644 --- a/lib/dal/src/workspace.rs +++ b/lib/dal/src/workspace.rs @@ -312,13 +312,15 @@ impl Workspace { .feature_is_enabled(&FeatureFlag::ActionsV2); let name = name.as_ref(); + let version_string = WorkspaceSnapshotGraphDiscriminants::V2.to_string(); + let row = ctx .txns() .await? .pg() .query_one( - "INSERT INTO workspaces (pk, name, default_change_set_id, uses_actions_v2) VALUES ($1, $2, $3, $4) RETURNING *", - &[&pk, &name, &change_set_id, &uses_actions_v2], + "INSERT INTO workspaces (pk, name, default_change_set_id, uses_actions_v2, snapshot_version) VALUES ($1, $2, $3, $4, $5) RETURNING *", + &[&pk, &name, &change_set_id, &uses_actions_v2, &version_string], ) .await?; let new_workspace = Self::try_from(row)?;