Field column length now fixed. Added documentation.

parent 2502d17c
...@@ -289,6 +289,15 @@ without date, time and timezone information, you should consider using this type ...@@ -289,6 +289,15 @@ without date, time and timezone information, you should consider using this type
Values retrieved from the database are always converted to PHP's ``\DateTime`` object Values retrieved from the database are always converted to PHP's ``\DateTime`` object
or ``null`` if no data is present. or ``null`` if no data is present.
dateinterval
^^^^^^^^^^^^
Maps and converts date and time difference data without timezone information.
If you know that the data to be stored is the difference between two date and time values,
you should consider using this type.
Values retrieved from the database are always converted to PHP's ``\DateInterval`` object
or ``null`` if no data is present.
.. note:: .. note::
See the `Known Vendor Issue <./known-vendor-issues>`_ section See the `Known Vendor Issue <./known-vendor-issues>`_ section
......
...@@ -22,6 +22,9 @@ class DateIntervalType extends Type ...@@ -22,6 +22,9 @@ class DateIntervalType extends Type
*/ */
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform) public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
{ {
$fieldDeclaration['length'] = 20;
$fieldDeclaration['fixed'] = true;
return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration); return $platform->getVarcharTypeDeclarationSQL($fieldDeclaration);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment