Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Doctrine\DBAL\DBALException : Unknown database type geography requested, Doctrine\DBAL\Platforms\SQLServer2012Platform may not support it. #175

Open
rthomas023 opened this issue Nov 7, 2018 · 1 comment

Comments

@rthomas023
Copy link

I am trying to generate migrations from an MS SQL Server 2014 database and one of my tables uses the "geography" data-type that the generator does not recognize and therefore throws the exception below.

at ../vendor/doctrine/dbal/lib/Doctrine/DBAL/Platforms/AbstractPlatform.php:479
475|
476| $dbType = strtolower($dbType);
477|
478| if (!isset($this->doctrineTypeMapping[$dbType])) {

479| throw new \Doctrine\DBAL\DBALException("Unknown database type ".$dbType." requested, " . get_class($this) . " may not support it.");
480| }
481|
482| return $this->doctrineTypeMapping[$dbType];
483| }

Exception trace:

1 Doctrine\DBAL\Platforms\AbstractPlatform::getDoctrineTypeMapping("geography")
../vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/SQLServerSchemaManager.php:123

2 Doctrine\DBAL\Schema\SQLServerSchemaManager::_getPortableTableColumnDefinition()
../vendor/doctrine/dbal/lib/Doctrine/DBAL/Schema/AbstractSchemaManager.php:831

Please use the argument -v to see more details.

@vahidzoli
Copy link

Hi Thomas, You must use njbarrett/laravel-postgis package to solve your issue,
first of all, install this package using composer and then go to your postgresql database and add postgis extension.
that's it!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants