-
-
Notifications
You must be signed in to change notification settings - Fork 1.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2653 from deeky666/fix-mysql57-platform
Merge MySQL 5.7.9 (GA) semantics into MySQL57Platform
- Loading branch information
Showing
6 changed files
with
61 additions
and
8 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,14 +23,31 @@ | |
use Doctrine\DBAL\Schema\TableDiff; | ||
|
||
/** | ||
* Provides the behavior, features and SQL dialect of the MySQL 5.7 database platform. | ||
* Provides the behavior, features and SQL dialect of the MySQL 5.7 (5.7.9 GA) database platform. | ||
* | ||
* @author İsmail BASKIN <[email protected]> | ||
* @author Steve Müller <[email protected]> | ||
* @link www.doctrine-project.org | ||
* @since 2.5 | ||
*/ | ||
class MySQL57Platform extends MySqlPlatform | ||
{ | ||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function hasNativeJsonType() | ||
{ | ||
return true; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
public function getJsonTypeDeclarationSQL(array $field) | ||
{ | ||
return 'JSON'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
|
@@ -64,4 +81,14 @@ protected function getReservedKeywordsClass() | |
{ | ||
return 'Doctrine\DBAL\Platforms\Keywords\MySQL57Keywords'; | ||
} | ||
|
||
/** | ||
* {@inheritdoc} | ||
*/ | ||
protected function initializeDoctrineTypeMappings() | ||
{ | ||
parent::initializeDoctrineTypeMappings(); | ||
|
||
$this->doctrineTypeMapping['json'] = 'json_array'; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters