Skip to content

Commit

Permalink
fix(dal): fix new workspace
Browse files Browse the repository at this point in the history
  • Loading branch information
zacharyhamm committed Aug 7, 2024
1 parent 2f86354 commit ad49ed8
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions lib/dal/src/workspace.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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)?;
Expand Down

0 comments on commit ad49ed8

Please sign in to comment.