From ad49ed8cf4ca9e33ce19acfd69abf063ff66d3aa Mon Sep 17 00:00:00 2001 From: Zachary Hamm Date: Wed, 7 Aug 2024 16:37:11 -0500 Subject: [PATCH] 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)?;