From e8709c3ad0eb57cac6b0f05ca06776b5ea837a7a Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Wed, 18 Mar 2026 12:24:27 +0100 Subject: [PATCH] feat: default datatable fork behavior to keep_original Co-Authored-By: Claude Opus 4.5 --- backend/windmill-api-workspaces/src/workspaces.rs | 4 ++-- backend/windmill-common/src/workspaces.rs | 2 +- .../workspaceSettings/CreateWorkspaceInner.svelte | 6 +++--- 3 files changed, 6 insertions(+), 6 deletions(-) diff --git a/backend/windmill-api-workspaces/src/workspaces.rs b/backend/windmill-api-workspaces/src/workspaces.rs index 7d08d00470..31b0ac584c 100644 --- a/backend/windmill-api-workspaces/src/workspaces.rs +++ b/backend/windmill-api-workspaces/src/workspaces.rs @@ -1744,7 +1744,7 @@ async fn fork_resource_datatable( } /// Fork all datatables from a source workspace into a target workspace. -/// Uses per-datatable behaviors from the provided map, defaulting to SchemaOnly. +/// Uses per-datatable behaviors from the provided map, defaulting to KeepOriginal. async fn fork_all_datatables( db: &DB, source_workspace_id: &str, @@ -1776,7 +1776,7 @@ async fn fork_all_datatables( let behavior = datatable_behaviors .as_ref() .and_then(|m| m.get(name).copied()) - .unwrap_or(DataTableForkBehavior::SchemaOnly); + .unwrap_or(DataTableForkBehavior::KeepOriginal); if behavior == DataTableForkBehavior::KeepOriginal { continue; diff --git a/backend/windmill-common/src/workspaces.rs b/backend/windmill-common/src/workspaces.rs index 61952fc9ac..6b26528c56 100644 --- a/backend/windmill-common/src/workspaces.rs +++ b/backend/windmill-common/src/workspaces.rs @@ -399,7 +399,7 @@ pub enum DataTableForkBehavior { impl Default for DataTableForkBehavior { fn default() -> Self { - DataTableForkBehavior::SchemaOnly + DataTableForkBehavior::KeepOriginal } } diff --git a/frontend/src/lib/components/workspaceSettings/CreateWorkspaceInner.svelte b/frontend/src/lib/components/workspaceSettings/CreateWorkspaceInner.svelte index 3f0e1dadd1..2144bbf713 100644 --- a/frontend/src/lib/components/workspaceSettings/CreateWorkspaceInner.svelte +++ b/frontend/src/lib/components/workspaceSettings/CreateWorkspaceInner.svelte @@ -189,10 +189,10 @@ return } - // Build datatable behaviors map, defaulting to schema_only + // Build datatable behaviors map, defaulting to keep_original const behaviors: Record = {} for (const dt of allDatatables.current ?? []) { - behaviors[dt] = datatableBehaviors[dt] ?? 'schema_only' + behaviors[dt] = datatableBehaviors[dt] ?? 'keep_original' } try { @@ -498,7 +498,7 @@