Skip to content

Commit 73e2d88

Browse files
committed
bugfix for postgis detection
1 parent 13d56e9 commit 73e2d88

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

tests/MysqlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -92,7 +92,7 @@ public function seedDatabase($db, $capabilities)
9292
$contents = file_get_contents($fixture);
9393

9494
if (!($capabilities & self::GIS)) {
95-
$contents = preg_replace('/(POINT|POLYGON) NOT NULL/i', 'text NOT NULL', $contents);
95+
$contents = preg_replace('/(POINT|POLYGON)( NOT)? NULL/i', 'text\2 NULL', $contents);
9696
$contents = preg_replace('/ST_GeomFromText/i', 'concat', $contents);
9797
}
9898
if (!($capabilities & self::JSON)) {

tests/PostgresqlTest.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ public function seedDatabase($db, $capabilities)
9393
$contents = file_get_contents($fixture);
9494

9595
if (!($capabilities & self::GIS)) {
96-
$contents = preg_replace('/(geometry) NOT NULL/i', 'text NOT NULL', $contents);
96+
$contents = preg_replace('/(geometry)( NOT)? NULL/i', 'text\2 NULL', $contents);
9797
$contents = preg_replace('/ST_GeomFromText/i', 'concat', $contents);
9898
$contents = preg_replace('/CREATE EXTENSION IF NOT EXISTS postgis;/i', '', $contents);
9999
}

0 commit comments

Comments
 (0)