You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
> Support for spatial types depends on your database driver. Please refer to your database's documentation. If your application is utilizing a PostgreSQL database, you must install the [PostGIS](https://postgis.net) extension before the `geography` method may be used.
585
582
586
583
<aname="column-method-geometry"></a>
587
584
#### `geometry()` {.collection-method}
588
585
589
-
The `geometry` method creates a `GEOMETRY` equivalent column:
586
+
The `geometry` method creates a `GEOMETRY` equivalent column with the given spatial type and SRID (Spatial Reference System Identifier):
> Support for spatial types depends on your database driver. Please refer to your database's documentation. If your application is utilizing a PostgreSQL database, you must install the [PostGIS](https://postgis.net) extension before the `geometry` method may be used.
592
592
593
593
<aname="column-method-id"></a>
594
594
#### `id()` {.collection-method}
@@ -634,13 +634,6 @@ The `jsonb` method creates a `JSONB` equivalent column:
634
634
635
635
$table->jsonb('options');
636
636
637
-
<aname="column-method-lineString"></a>
638
-
#### `lineString()` {.collection-method}
639
-
640
-
The `lineString` method creates a `LINESTRING` equivalent column:
641
-
642
-
$table->lineString('positions');
643
-
644
637
<aname="column-method-longText"></a>
645
638
#### `longText()` {.collection-method}
646
639
@@ -685,27 +678,6 @@ This method is intended to be used when defining the columns necessary for a pol
685
678
686
679
$table->morphs('taggable');
687
680
688
-
<aname="column-method-multiLineString"></a>
689
-
#### `multiLineString()` {.collection-method}
690
-
691
-
The `multiLineString` method creates a `MULTILINESTRING` equivalent column:
692
-
693
-
$table->multiLineString('positions');
694
-
695
-
<aname="column-method-multiPoint"></a>
696
-
#### `multiPoint()` {.collection-method}
697
-
698
-
The `multiPoint` method creates a `MULTIPOINT` equivalent column:
699
-
700
-
$table->multiPoint('positions');
701
-
702
-
<aname="column-method-multiPolygon"></a>
703
-
#### `multiPolygon()` {.collection-method}
704
-
705
-
The `multiPolygon` method creates a `MULTIPOLYGON` equivalent column:
706
-
707
-
$table->multiPolygon('positions');
708
-
709
681
<aname="column-method-nullableTimestamps"></a>
710
682
#### `nullableTimestamps()` {.collection-method}
711
683
@@ -734,20 +706,6 @@ The method is similar to the [uuidMorphs](#column-method-uuidMorphs) method; how
734
706
735
707
$table->nullableUuidMorphs('taggable');
736
708
737
-
<aname="column-method-point"></a>
738
-
#### `point()` {.collection-method}
739
-
740
-
The `point` method creates a `POINT` equivalent column:
741
-
742
-
$table->point('position');
743
-
744
-
<aname="column-method-polygon"></a>
745
-
#### `polygon()` {.collection-method}
746
-
747
-
The `polygon` method creates a `POLYGON` equivalent column:
@@ -62,3 +63,27 @@ The `dump` method of the `Illuminate\Support\Enumerable` contract has been updat
62
63
```php
63
64
public function dump(...$args);
64
65
```
66
+
67
+
<aname="database"></a>
68
+
### Database
69
+
70
+
<aname="spatial-types"></a>
71
+
#### Spatial Types
72
+
73
+
**Likelihood Of Impact: Low**
74
+
75
+
The spatial column types of database migrations have been rewritten to be consistent across all databases. Therefore, you may remove `point`, `lineString`, `polygon`, `geometryCollection`, `multiPoint`, `multiLineString`, `multiPolygon`, and `multiPolygonZ` methods from your migrations and use `geometry` or `geography` methods instead:
76
+
77
+
```php
78
+
$table->geometry('shapes');
79
+
$table->geography('coordinates');
80
+
```
81
+
82
+
To explicitly restrict the type or the spatial reference system identifier for values stored in the column on MySQL and PostgreSQL, you may pass the `subtype` and `srid` to the method:
0 commit comments