diff --git a/apps/desktop/src/components/structure/TableStructureEditor.vue b/apps/desktop/src/components/structure/TableStructureEditor.vue index 1a8e9c2c02..901d324ef6 100644 --- a/apps/desktop/src/components/structure/TableStructureEditor.vue +++ b/apps/desktop/src/components/structure/TableStructureEditor.vue @@ -76,6 +76,11 @@ import { generateUniqueIndexName, getColumnEditorControls, getDataTypeOptions, + POSTGRES_GEOMETRY_TYPES, + combinePostgresGeometryType, + isPostgresGeometryDataType, + postgresGeometrySridValue, + postgresGeometryTypeValue, getDataTypeLengthUnitOptions, getDefaultLengthForType, hasExistingColumnTypeChange, @@ -2796,6 +2801,11 @@ function updateColumnDataTypeLength(column: EditableStructureColumn, value: stri syncDamengIdentityForDataType(column); } +function updatePostgresGeometryColumn(column: EditableStructureColumn, geomType: string, srid: string) { + const baseType = dataTypeBaseInputValue(databaseType.value, column.dataType); + column.dataType = combinePostgresGeometryType(baseType, geomType, srid); +} + function updateColumnDataTypeLengthUnit(column: EditableStructureColumn, value: unknown) { const baseType = dataTypeBaseInputValue(databaseType.value, column.dataType); const unit = value === "__default" ? "" : String(value ?? ""); @@ -4453,6 +4463,35 @@ watch( +
+
+ + +
+

+ {{ t("structureEditor.geometryEmptyTypeHint") }} +

+