Skip to content

Commit

Permalink
Merge pull request #64 from njbarrett/fix-undefined-data-type
Browse files Browse the repository at this point in the history
Fixes #62. Unknown database type geography requested
  • Loading branch information
njbarrett committed Jan 16, 2017
2 parents 7e776e3 + 872a9e7 commit 5af1d26
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 5af1d26

Please sign in to comment.