{#if applicableCount > 0}

Datatable schema changes

{#if loading}
Loading datatable diffs...
{:else if error}
Failed to load datatable diffs: {error}
{:else if diffs.length > 0}
{#each diffs as diff} {#if expandedDatatables.has(diff.datatableName)}
{#if diff.aheadChanges.length > 0}
Fork changes (ahead)
{#each diff.aheadChanges as change}
{#if change.kind === 'added'} {:else if change.kind === 'removed'} {:else} {/if} {change.schemaName}. {change.tableName} {operationSummary(change)}
{/each}
{/if} {#if diff.behindChanges.length > 0}
Parent changes (behind)
{#each diff.behindChanges as change}
{#if change.kind === 'added'} {:else if change.kind === 'removed'} {:else} {/if} {change.schemaName}. {change.tableName} {operationSummary(change)}
{/each}
{/if}
{/if}
{/each}
{:else} No changes detected {/if}
{/if} {#if drawerChange && drawerDiff && drawerDirection} {@const yaml = getDiffYaml()} (drawerOpen = false)} title="{drawerChange.schemaName}.{drawerChange.tableName} ({drawerDirection === 'ahead' ? 'Fork → Parent' : 'Parent → Fork'})" > {#snippet actions()} {/snippet}
{#if drawerDirection == 'ahead'} You have made these changes in {currentWorkspaceId} that are not yet deployed in {parentWorkspaceId}. {:else if drawerDirection == 'behind'} These changes were made in {parentWorkspaceId} but the current workspace is not up to date. {/if}
Schema diff (parent ↔ fork)
{#await import('$lib/components/DiffEditor.svelte')}
{:then Module} {/await}
SQL migration
{/if}
{ confirmDeployOpen = false await runMigration() }} onCanceled={() => { confirmDeployOpen = false }} >

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

{migrationSql}