Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
D
doctrine-dbal
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Tomáš Trávníček
doctrine-dbal
Commits
70924a83
Unverified
Commit
70924a83
authored
Oct 30, 2017
by
belgattitude
Committed by
Luís Cobucci
Nov 19, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Removed unused use statement
parent
b075331d
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
2 additions
and
15 deletions
+2
-15
MySqlPlatform.php
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
+2
-15
No files found.
lib/Doctrine/DBAL/Platforms/MySqlPlatform.php
View file @
70924a83
...
@@ -26,7 +26,6 @@ use Doctrine\DBAL\Schema\Table;
...
@@ -26,7 +26,6 @@ use Doctrine\DBAL\Schema\Table;
use
Doctrine\DBAL\Schema\TableDiff
;
use
Doctrine\DBAL\Schema\TableDiff
;
use
Doctrine\DBAL\Types\BlobType
;
use
Doctrine\DBAL\Types\BlobType
;
use
Doctrine\DBAL\Types\TextType
;
use
Doctrine\DBAL\Types\TextType
;
use
Doctrine\DBAL\Types\Type
;
/**
/**
* The MySqlPlatform provides the behavior, features and SQL dialect of the
* The MySqlPlatform provides the behavior, features and SQL dialect of the
...
@@ -460,27 +459,15 @@ class MySqlPlatform extends AbstractPlatform
...
@@ -460,27 +459,15 @@ class MySqlPlatform extends AbstractPlatform
return
$sql
;
return
$sql
;
}
}
/**
* Tells whether a field type supports declaration of a default value.
*
* MySQL (as of 5.7.19) does not support default values for Blob and Text
* columns while MariaDB 10.2.1 does.
*/
protected
function
isDefaultValueSupportedForType
(
Type
$field
)
:
bool
{
return
!
$field
instanceof
TextType
&&
!
$field
instanceof
BlobType
;
}
/**
/**
* {@inheritdoc}
* {@inheritdoc}
*/
*/
public
function
getDefaultValueDeclarationSQL
(
$field
)
public
function
getDefaultValueDeclarationSQL
(
$field
)
{
{
// Unset the default value if the given field
type
does not allow default values.
// Unset the default value if the given field
definition
does not allow default values.
if
(
!
$this
->
isDefaultValueSupportedForType
(
$field
[
'type'
])
)
{
if
(
$field
[
'type'
]
instanceof
TextType
||
$field
[
'type'
]
instanceof
BlobType
)
{
$field
[
'default'
]
=
null
;
$field
[
'default'
]
=
null
;
}
}
return
parent
::
getDefaultValueDeclarationSQL
(
$field
);
return
parent
::
getDefaultValueDeclarationSQL
(
$field
);
}
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment