I am new to Laravel and postgres. I am using postGres without postGIS extension, postGres alone does allow a point type for columns even without postGIS, my migration in the larval fails and gives me this error
Illuminate\Database\QueryException : SQLSTATE[42704]: Undefined object: 7 ERROR: type "geography" does not exist at character 134 (SQL: create table "profiles" ("id" bigserial primary key not null, "produc t" varchar(50) not null, "details" varchar(1000) not null, "xy" geography(point, 4326) not null, "created_at" timestamp(0) without time zone null, "updated_at" timestamp(0) without time zone null))
my code for migration function is below
public function up()
{
Schema::connection('pgsql')->create('profiles', function (Blueprint $table) {
$table->bigIncrements('id');
$table->string('product',50);
$table->string('details',1000);
$table->point('xy');
$table->timestamps();
});
}
xy column is meant to be a simple point type available in postgres, but it appears that laravel translates this into geography type which is available in postGIS and I do not need postGIS in my case.
Please advise how to create a point column in laravel without postGIS.
Thanks