我有一个表迁移,如下所示:
use Illuminate\Support\Facades\Schema;
use Grimzy\LaravelMysqlSpatial\Schema\Blueprint; //use this as blueprint
use Illuminate\Database\Migrations\Migration;
Schema::create('properties', function (Blueprint $table) {
$table->increments('id');
$table->string('name');
$table->point('position');
$table->integer('radius');
$table->polygon('area_perimeter');
});
此外,我正在使用此库并将特性添加到属性模型:
https://packagist.org/packages/grimzy/laravel-mysql-spatial
在将position和area_perimeter更新为使用地理空间类型之前,PHPUnit可与
一起使用<env name="APP_ENV" value="testing"/>
<env name="CACHE_DRIVER" value="array"/>
<env name="QUEUE_CONNECTION" value="sync"/>
<env name="SESSION_DRIVER" value="array"/>
<env name="MAIL_DRIVER" value="array"/>
<env name="DB_CONNECTION" value="sqlite"/>
<env name="DB_DATABASE" value=":memory:"/>
<env name="TELESCOPE_ENABLED" value="false"/>
但是现在它不再起作用,并且我收到此错误:
Argument 1 passed to CreatePropertiesTable::{closure}() must be an instance of Grimzy\LaravelMysqlSpatial\Schema\Blueprint, instance of Illuminate\Database\Schema\Blueprint given
与sqlite有关的内容不支持点和多边形列
我希望能够在内存中的mysql上运行phpunit。或者我该如何满足上述要求?