@@ -400,6 +400,14 @@ json
400
400
Maps to a ``JSON `` type if it's available, otherwise it maps to ``TEXT ``.
401
401
enum
402
402
See :ref: `enum-type `.
403
+ geometry
404
+ Maps to a generic geometry storage type.
405
+ point
406
+ Maps to a single point in geospatial storage.
407
+ linestring
408
+ Maps to a single line in geospatial storage.
409
+ polygon
410
+ Maps to a single polygon in geospatial storage.
403
411
404
412
These types are used in both the schema reflection features that CakePHP
405
413
provides, and schema generation features CakePHP uses when using test fixtures.
@@ -411,6 +419,10 @@ automatically convert input parameters from ``DateTime`` instances into a
411
419
timestamp or formatted datestrings. Likewise, 'binary' columns will accept file
412
420
handles, and generate file handles when reading data.
413
421
422
+ .. versionchanged :: 5.1.0
423
+ The ``geometry ``, ``point ``, ``linestring ``, and ``polygon `` types were
424
+ added.
425
+
414
426
.. _datetime-type :
415
427
416
428
DateTime Type
@@ -491,6 +503,16 @@ CakePHP recommends a few conventions for enums:
491
503
- Enums should implement the ``Cake\Database\Type\EnumLabelInterface `` to
492
504
improve compatibility with bake, and ``FormHelper ``.
493
505
506
+ Geospatial Types
507
+ ----------------
508
+
509
+ The ``geometry ``, ``point ``, ``linestring ``, and ``polygon `` types are also known
510
+ as the "geospatial types". CakePHP offers limited support for geospatial
511
+ columns. Currently they can be defined in migrations, read in schema reflection,
512
+ and have values set as text.
513
+
514
+ .. versionadded :: 5.1.0
515
+ Geospatial schema types were added.
494
516
495
517
.. _adding-custom-database-types :
496
518
0 commit comments