diff --git a/apps/desktop/src/components/structure/TableStructureEditor.vue b/apps/desktop/src/components/structure/TableStructureEditor.vue
index a94f1964f0..54d42d5b6e 100644
--- a/apps/desktop/src/components/structure/TableStructureEditor.vue
+++ b/apps/desktop/src/components/structure/TableStructureEditor.vue
@@ -147,17 +147,28 @@ const indexTypeOptions = computed(() =>
structureCapabilities.value.indexType ? (indexTypesByDb[databaseType.value ?? ""] ?? []) : [],
);
-const colLabels = computed(() => [
- "#",
- t("structureEditor.columnName"),
- t("structureEditor.dataType"),
- t("structureEditor.length"),
- t("structureEditor.nullable"),
- t("structureEditor.primaryKey"),
- t("structureEditor.defaultValue"),
- t("structureEditor.comment"),
- t("structureEditor.actions"),
-]);
+const showExtendedProperties = computed(() => {
+ const dt = databaseType.value;
+ return dt === "mysql" || dt === "postgres" || dt === "sqlserver";
+});
+
+const colLabels = computed(() => {
+ const labels = [
+ "#",
+ t("structureEditor.columnName"),
+ t("structureEditor.dataType"),
+ t("structureEditor.length"),
+ t("structureEditor.nullable"),
+ t("structureEditor.primaryKey"),
+ t("structureEditor.defaultValue"),
+ t("structureEditor.comment"),
+ ];
+ if (showExtendedProperties.value) {
+ labels.push(t("structureEditor.extendedProperties"));
+ }
+ labels.push(t("structureEditor.actions"));
+ return labels;
+});
const indexColLabels = computed(() => [
t("structureEditor.indexName"),
t("structureEditor.indexColumns"),
@@ -252,7 +263,7 @@ async function loadStructure(silent = false) {
api.listForeignKeys(props.connectionId, props.database, targetSchema.value, props.tableName).catch(() => []),
api.listTriggers(props.connectionId, props.database, targetSchema.value, props.tableName).catch(() => []),
]);
- columns.value = createColumnDrafts(nextColumns);
+ columns.value = createColumnDrafts(nextColumns, databaseType.value);
indexes.value = createIndexDrafts(nextIndexes);
foreignKeys.value = nextForeignKeys;
triggers.value = nextTriggers;
@@ -284,6 +295,7 @@ async function addColumn() {
defaultValue: "",
comment: "",
isPrimaryKey: false,
+ extra: {},
markedForDrop: false,
});
await nextTick();
@@ -693,6 +705,106 @@ watch(
+
+
+
+
+
+
+
+
+
+
+
+ {
+ if (column.extra.identity) {
+ column.extra.identity.seed = v ? Number(v) : undefined;
+ }
+ }
+ "
+ />
+ {
+ if (column.extra.identity) {
+ column.extra.identity.increment = v ? Number(v) : undefined;
+ }
+ }
+ "
+ />
+
+
+
+
+
+
+ {
+ if (!column.extra.identity) column.extra.identity = {};
+ column.extra.identity.seed = v ? Number(v) : undefined;
+ }
+ "
+ />
+ {
+ if (!column.extra.identity) column.extra.identity = {};
+ column.extra.identity.increment = v ? Number(v) : undefined;
+ }
+ "
+ />
+
+
+
+ |
|