diff --git a/CHANGELOG.md b/CHANGELOG.md index 963f0be..ce13005 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,6 +7,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## Unreleased +## [2.0.1](https://github.com/clickbar/laravel-magellan/tree/2.0.1) - 2025-08-13 + ### Fixed - Fixed using the casts after serialization, e.g. in queueable anonymous event listeners. (thanks @henridv #149) diff --git a/README.md b/README.md index 6ff364e..f7b0ccb 100644 --- a/README.md +++ b/README.md @@ -31,16 +31,16 @@ - [Generators \& Parsers](#generators--parsers) - [Request Validation and Transformation](#request-validation-and-transformation) - [Interaction with the database](#interaction-with-the-database) - - [Example Setup](#example-setup) - - [Insert/Update](#insertupdate) - - [Insert/Update with different SRID](#insertupdate-with-different-srid) - - [Select](#select) - - [Using PostGIS functions in queries](#using-postgis-functions-in-queries) - - [Alias in select](#alias-in-select) - - [Geometry or Geography](#geometry-or-geography) - - [Autocast for BBox or geometries](#autocast-for-bbox-or-geometries) + - [Example Setup](#example-setup) + - [Insert/Update](#insertupdate) + - [Insert/Update with different SRID](#insertupdate-with-different-srid) + - [Select](#select) + - [Using PostGIS functions in queries](#using-postgis-functions-in-queries) + - [Alias in select](#alias-in-select) + - [Geometry or Geography](#geometry-or-geography) + - [Autocast for BBox or geometries](#autocast-for-bbox-or-geometries) - [Limitations](#limitations) - - [Database Name Prepending (Cross Database Connections)](#database-name-prepending-cross-database-connections) + - [Database Name Prepending (Cross Database Connections)](#database-name-prepending-cross-database-connections) - [Testing](#testing) - [Changelog](#changelog) - [Contributing](#contributing) @@ -49,7 +49,6 @@ - [Credits](#credits) - [License](#license) - ## Introduction Every sailor needs a nice ship to travel the seven seas ⛵️ @@ -117,9 +116,7 @@ Please see [UPGRADING](UPGRADING.md) for details. - [x] Geometry and BBox Cast classes - [x] Auto Cast when using functions that return geometry or bbox - [x] Empty Geometry Support -- [ ] Custom update Builder method for conversion safety - [ ] Automatic PostGIS Function Doc Generator -- [ ] BBox support within $postgisColumns & trait (currently with cast only) - [ ] Custom Geometry Factories & Models - [ ] More tests - ... @@ -131,14 +128,27 @@ able to see everything included in the IDEs auto-completion. ## Creating Tables with PostGIS Columns -Laravel-magellan extends the default Schema Blueprint with all PostGIS functions. Since Laravel has introduced basic -geometry support, all methods are prefixed with `magellan`. e.g. +> [!NOTE] +> Please use the new built-in Laravel methods `geometry` and `geography` where possible. +> Only the `magellanBox2D`, `magellanBox3D`, `magellanGeometryCollection`-functions are not deprecated. +> All other methods are deprecated and will be removed in the next major version. + +Laravel-magellan extends the default Schema Blueprint with all PostGIS functions. +Since Laravel has introduced basic geometry support, all methods are prefixed with `magellan`. e.g. ```php +// Deprecated, use the new Laravel methods instead ->geometry('location', 'POINT', 4326) $table->magellanPoint('location', 4326); -``` -![List of all schema methods](art/magellan_schema.png) +// Special column types (not deprecated) +$table->magellanBox2D('bounds2d'); +$table->magellanBox3D('bounds3d'); +$table->magellanGeometryCollection('collection'); +$table->magellanGeometryCollectionM('collection_m'); +$table->magellanGeometryCollectionZ('collection_z'); +$table->magellanGeometryCollectionZM('collection_zm'); + +``` ## Preparing the Model diff --git a/art/magellan_schema.png b/art/magellan_schema.png deleted file mode 100644 index cf76be7..0000000 Binary files a/art/magellan_schema.png and /dev/null differ