diff --git a/src/Crate/DBAL/Driver/PDOCrate/Driver.php b/src/Crate/DBAL/Driver/PDOCrate/Driver.php index 0c4dddb..65fae05 100644 --- a/src/Crate/DBAL/Driver/PDOCrate/Driver.php +++ b/src/Crate/DBAL/Driver/PDOCrate/Driver.php @@ -78,7 +78,14 @@ private function constructPdoDsn(array $params): string */ public function getDatabasePlatform(): AbstractPlatform { - return new CratePlatform4(); + // FIXME: Chicken egg problem: No connection information here. + // Is this meant to "activate" the right platform *after* a server + // inquiry at all? Isn't it more likely it is NOT meant to work this way? + // Let's investigate how the other vendors are doing it. + $conn = $this->connect(); + $version = $conn->getServerVersion(); + $platform = $this->createDatabasePlatformForVersion($version); + return $platform; } /**