mirror of
https://github.com/DeNNiiInc/dbgate.git
synced 2026-04-20 00:46:01 +00:00
more data types in table editor #285
This commit is contained in:
@@ -26,7 +26,7 @@
|
||||
>
|
||||
|
||||
<FormTextField name="columnName" label="Column name" focused />
|
||||
<DataTypeEditor />
|
||||
<DataTypeEditor dialect={driver?.dialect} />
|
||||
|
||||
<FormCheckboxField name="notNull" label="NOT NULL" />
|
||||
<FormCheckboxField name="isPrimaryKey" label="Is Primary Key" />
|
||||
|
||||
@@ -4,7 +4,7 @@
|
||||
|
||||
const { values, setFieldValue } = getFormContext();
|
||||
|
||||
$: dataTypes = ['int', 'nvarchar(250)', 'datetime', 'numeric(10,2)', 'float'];
|
||||
$: dataTypes = dialect?.predefinedDataTypes || ['int', 'varchar(250)', 'datetime', 'numeric(10,2)', 'float'];
|
||||
|
||||
function createDataTypesMenu() {
|
||||
return dataTypes.map(type => ({
|
||||
@@ -13,6 +13,7 @@
|
||||
}));
|
||||
}
|
||||
|
||||
export let dialect;
|
||||
</script>
|
||||
|
||||
<FormDropDownTextField name="dataType" label="Data type" menu={createDataTypesMenu} />
|
||||
|
||||
Reference in New Issue
Block a user