Merge branch 'master' into BUDI-8279/time-constrains
This commit is contained in:
commit
cf43530e1c
|
@ -612,6 +612,7 @@
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
{#if !editableColumn.timeOnly}
|
||||||
{#if datasource?.source !== SourceName.ORACLE && datasource?.source !== SourceName.SQL_SERVER && !editableColumn.dateOnly}
|
{#if datasource?.source !== SourceName.ORACLE && datasource?.source !== SourceName.SQL_SERVER && !editableColumn.dateOnly}
|
||||||
<div>
|
<div>
|
||||||
<div class="row">
|
<div class="row">
|
||||||
|
@ -633,6 +634,7 @@
|
||||||
</div>
|
</div>
|
||||||
{/if}
|
{/if}
|
||||||
<Toggle bind:value={editableColumn.dateOnly} text="Date only" />
|
<Toggle bind:value={editableColumn.dateOnly} text="Date only" />
|
||||||
|
{/if}
|
||||||
{:else if editableColumn.type === FieldType.NUMBER && !editableColumn.autocolumn}
|
{:else if editableColumn.type === FieldType.NUMBER && !editableColumn.autocolumn}
|
||||||
<div class="split-label">
|
<div class="split-label">
|
||||||
<div class="label-length">
|
<div class="label-length">
|
||||||
|
|
|
@ -73,6 +73,16 @@ function validate(table: Table, oldTable?: Table) {
|
||||||
`Column "${key}" has subtype "${column.subtype}" - this is not supported.`
|
`Column "${key}" has subtype "${column.subtype}" - this is not supported.`
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (column.type === FieldType.DATETIME) {
|
||||||
|
const oldColumn = oldTable?.schema[key] as typeof column
|
||||||
|
|
||||||
|
if (oldColumn && column.timeOnly !== oldColumn.timeOnly) {
|
||||||
|
throw new Error(
|
||||||
|
`Column "${key}" can not change from time to datetime or viceversa.`
|
||||||
|
)
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue