Skip to content

Commit

Permalink
Fixing issue when running in Parallel test mode
Browse files Browse the repository at this point in the history
  • Loading branch information
joshbaumann committed Jul 23, 2023
1 parent ab8550b commit 84def94
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/MysqlConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,14 +6,15 @@
use Grimzy\LaravelMysqlSpatial\Schema\Builder;
use Grimzy\LaravelMysqlSpatial\Schema\Grammars\MySqlGrammar;
use Illuminate\Database\MySqlConnection as IlluminateMySqlConnection;
use Illuminate\Support\Facades\ParallelTesting;

class MysqlConnection extends IlluminateMySqlConnection
{
public function __construct($pdo, $database = '', $tablePrefix = '', array $config = [])
{
parent::__construct($pdo, $database, $tablePrefix, $config);

if (class_exists(DoctrineType::class)) {
if (class_exists(DoctrineType::class) && !ParallelTesting::token()) {
// Prevent geometry type fields from throwing a 'type not found' error when changing them
$geometries = [
'geometry',
Expand Down

0 comments on commit 84def94

Please sign in to comment.