Skip to content

Commit

Permalink
Fixes #62. Unknown database type geography requested
Browse files Browse the repository at this point in the history
  • Loading branch information
nickbarrettjb committed Jan 16, 2017
1 parent 7e776e3 commit 872a9e7
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions src/PostgisConnection.php
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,14 @@

class PostgisConnection extends \Bosnadev\Database\PostgresConnection
{
public function __construct($pdo, $database = '', $tablePrefix = '', array $config = [])
{
parent::__construct($pdo, $database, $tablePrefix, $config);

// Prevent geography type fields from throwing a 'type not found' error.
$this->getDoctrineSchemaManager()->getDatabasePlatform()->registerDoctrineTypeMapping('geography', 'string');
}

/**
* Get the default schema grammar instance.
*
Expand Down

0 comments on commit 872a9e7

Please sign in to comment.