handle sparse, zerofill, unsigned, commant flags

This commit is contained in:
Jan Prochazka
2022-02-10 13:32:38 +01:00
parent 691bb0af4f
commit 0debe66dd0
11 changed files with 81 additions and 5 deletions

View File

@@ -20,6 +20,7 @@
export let setTableInfo;
export let tableInfo;
export let onAddNext;
export let driver;
</script>
<FormProvider initialValues={fillEditorColumnInfo(columnInfo || {}, tableInfo)}>
@@ -36,6 +37,18 @@
<FormCheckboxField name="autoIncrement" label="Is Autoincrement" />
<FormTextField name="defaultValue" label="Default value" />
<FormTextField name="computedExpression" label="Computed expression" />
{#if driver?.dialect?.columnProperties?.isUnsigned}
<FormCheckboxField name="isUnsigned" label="Unsigned" />
{/if}
{#if driver?.dialect?.columnProperties?.isZerofill}
<FormCheckboxField name="isZerofill" label="Zero fill" />
{/if}
{#if driver?.dialect?.columnProperties?.columnComment}
<FormTextField name="columnComment" label="Comment" />
{/if}
{#if driver?.dialect?.columnProperties?.isSparse}
<FormCheckboxField name="isSparse" label="Sparse" />
{/if}
<svelte:fragment slot="footer">
<FormSubmit