Skip to content

Commit

Permalink
Merge pull request #71 from directus/DX-504
Browse files Browse the repository at this point in the history
Adding geospatial datatypes
  • Loading branch information
hola-soy-milk authored Dec 9, 2024
2 parents 5199e2e + fbc70a8 commit 3a02109
Showing 1 changed file with 11 additions and 8 deletions.
19 changes: 11 additions & 8 deletions content/2.data-modeling/3.fields.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,17 +10,20 @@ Fields are database columns with additional metadata and configuration used by D

Directus supports various databases, though each vendor has their own simple data types. To standardize these differences, Directus has a single set of types that are mapped to the vendor-specific ones.

| Group | Types |
| ------------- | -------------------------------------------- |
| Text | `String`, `Text`, `UUID`, `Hash`, `Alias` |
| Numeric | `Integer`, `Big Integer`, `Float`, `Decimal` |
| Boolean | `Boolean` |
| Date and Time | `Timestamp`, `DateTime`, `Date`, `Time` |
| Binary | `Binary` |
| Structured | `JSON`, `CSV` |
| Group | Types |
| ------------- | --------------------------------------------------------------------------------- |
| Text | `String`, `Text`, `UUID`, `Hash`, `Alias` |
| Numeric | `Integer`, `Big Integer`, `Float`, `Decimal` |
| Boolean | `Boolean` |
| Date and Time | `Timestamp`, `DateTime`, `Date`, `Time` |
| Binary | `Binary` |
| Structured | `JSON`, `CSV` |
| Geospatial | `Point`, `LineString`, `Polygon`, `MultiPoint`, `MultiLineString`, `MultiPolygon` |

Fields that do not map directly to an actual database column are called "alias" fields, and include presentational fields and certain relational fields.

Geospatial fields are used to store data in [GeoJSON](https://geojson.org/) format. These types are only supported if your database supports spatial extensions.

## Creating Fields

When creating a new field, you must first select an [interface](/data-modeling/interfaces) and provide some basic configuration. Basic configuration will depend on the interface selected, but all fields have some common characteristics.
Expand Down

0 comments on commit 3a02109

Please sign in to comment.