Name Type {features?.primaryKeys ? 'Primary' : ''} {#each values.columns as column, i}
column.name, (newName) => { const oldName = column.name column.name = newName // Update all foreign keys that reference this column if (oldName && oldName !== newName) { values.foreignKeys.forEach((fk) => { fk.columns.forEach((fkCol) => { if (fkCol.sourceColumn === oldName) { fkCol.sourceColumn = newName } }) }) } } } /> {#if column.initialName && column.name !== column.initialName} Old name: {column.initialName} {/if}
{/if} {#snippet trigger()} {/snippet} {#snippet content()} {#if datatypeHasLength(column.datatype)} {/if} {#if features?.defaultValues} {/if} {#if !column.primaryKey} {/if} {/snippet}
{#if features?.foreignKeys}
Table Columns {#each values.foreignKeys as foreignKey, foreignKeyIndex} {@const fkErrors = errors?.foreignKeys?.[foreignKeyIndex]} c.name.length) .map((c) => ({ value: c.name }))} clearable={false} />
{/snippet} {/if}
{/each}
{/each} {/if} (askingForConfirmation = undefined)} on:confirmed={askingForConfirmation?.onConfirm ?? (() => {})} > {#if askingForConfirmation?.alert} {askingForConfirmation.alert.body} {/if} {#if askingForConfirmation?.codeContent}
{askingForConfirmation.codeContent}
{/if}