From 9afbc1f97627fe7e0b34397e61956cf7ab3d2cec Mon Sep 17 00:00:00 2001 From: Diego Imbert Date: Thu, 26 Mar 2026 20:47:42 +0100 Subject: [PATCH] feat: add confirmation modal before deploying migration to parent Co-Authored-By: Claude Opus 4.5 --- .../lib/components/DatatableSchemaDiff.svelte | 35 ++++++++++++++++++- 1 file changed, 34 insertions(+), 1 deletion(-) diff --git a/frontend/src/lib/components/DatatableSchemaDiff.svelte b/frontend/src/lib/components/DatatableSchemaDiff.svelte index 485559c31c..b2c303fab3 100644 --- a/frontend/src/lib/components/DatatableSchemaDiff.svelte +++ b/frontend/src/lib/components/DatatableSchemaDiff.svelte @@ -157,6 +157,7 @@ import { runScriptAndPollResult } from '$lib/components/jobs/utils' import YAML from 'yaml' import DrawerContent from './common/drawer/DrawerContent.svelte' + import ConfirmationModal from './common/confirmationModal/ConfirmationModal.svelte' import Alert from './common/alert/Alert.svelte' interface Props { @@ -178,6 +179,7 @@ let drawerDirection: 'ahead' | 'behind' | undefined = $state(undefined) let migrationSql = $state('') let migrationRunning = $state(false) + let confirmDeployOpen = $state(false) async function loadDiffs() { loading = true @@ -453,7 +455,17 @@ > {#snippet actions()} - {/snippet} @@ -500,3 +512,24 @@ {/if} + + { + confirmDeployOpen = false + await runMigration() + }} + onCanceled={() => { + confirmDeployOpen = false + }} +> +

+ This will run the following SQL on {parentWorkspaceId}: +

+
{migrationSql}
+