When I wrote my migration, I ask for having a point data type but results in geography(Point), not really what I want.
Not a problem, it's easy to use too… but it's not a POINT.
$table->point('position')->nullable()point transforms himself into a geography(Point,4326)In PostgresGrammar.php the point defines as:
/**
* Create the column definition for a spatial Point type.
*
* @param \Illuminate\Support\Fluent $column
* @return string
*/
protected function typePoint(Fluent $column)
{
return $this->formatPostGisType('point', $column);
}
So the blueprint point means postgis point which is 'geography(point, projection)'. I don't know how to get a postgresql 'raw' point with BluePrint too. 😞
So the blueprint point means postgis point which is 'geography(point, projection)'. I don't know how to get a postgresql 'raw' point with BluePrint too. 😞
Yes, that's exactly my point, on the POINT creation for PostgreSQL, it's really strange that Laravel Documentation doesn't mention that "POINT" are only for PostGis (when pgsql is the database driver). Really confusing !
I've also try with MariaDB/MySQL, and the POINT is a POINT. And for SQLite, there is no POINT so no possibilities to use it (quite normal, but no Documentation on that point too).
If something isn't clear in the docs feel free to send in a pr.
@driesvints It's not about docs being clear, it's about a POINT is a POINT. If you create a FLOAT because a DECIMAL doesn't exist it's clear, if you create a GEOGRAPHY for a POINT but a POINT exist, I don't get it.
To be clear here : nothing mention PostGis into docs, no problem, so people can create with PostgreSQL, and POINT exist in it. It's not the docs problem, it's what @mo3000 mention : POINT are transformed to GEOGRAPHY.
Really not the same.
@taylorotwell How can I use point datatype in laravel 5.8 migration using posrgres. In any of the laravel version, there is no support for point data type. While migrating it makes POINT datatype to GEOGRAPHY datatype.
@driesvints Any other alternate of POINT datatype for postgres ?
Most helpful comment
@driesvints It's not about docs being clear, it's about a POINT is a POINT. If you create a FLOAT because a DECIMAL doesn't exist it's clear, if you create a GEOGRAPHY for a POINT but a POINT exist, I don't get it.
To be clear here : nothing mention PostGis into docs, no problem, so people can create with PostgreSQL, and POINT exist in it. It's not the docs problem, it's what @mo3000 mention : POINT are transformed to GEOGRAPHY.
Really not the same.