mirror of
https://github.com/alchemy-fr/Phraseanet.git
synced 2025-10-16 14:33:14 +00:00
Add Binary MySQL type to doctrine for parsing old Phrasea Tables
This commit is contained in:
38
lib/Doctrine/Types/Binary.php
Normal file
38
lib/Doctrine/Types/Binary.php
Normal file
@@ -0,0 +1,38 @@
|
||||
<?php
|
||||
|
||||
/*
|
||||
* This file is part of Phraseanet
|
||||
*
|
||||
* (c) 2005-2010 Alchemy
|
||||
*
|
||||
* For the full copyright and license information, please view the LICENSE
|
||||
* file that was distributed with this source code.
|
||||
*/
|
||||
|
||||
/**
|
||||
*
|
||||
* @package
|
||||
* @license http://opensource.org/licenses/gpl-3.0 GPLv3
|
||||
* @link www.phraseanet.com
|
||||
*/
|
||||
|
||||
namespace Types;
|
||||
|
||||
use Doctrine\DBAL\Types\Type;
|
||||
use Doctrine\DBAL\Platforms\AbstractPlatform;
|
||||
|
||||
class Binary extends Type
|
||||
{
|
||||
const BINARY = 'binary';
|
||||
|
||||
public function getName()
|
||||
{
|
||||
return static::BINARY;
|
||||
}
|
||||
|
||||
public function getSQLDeclaration(array $fieldDeclaration, AbstractPlatform $platform)
|
||||
{
|
||||
return $platform->getDoctrineTypeMapping('BINARY');
|
||||
}
|
||||
|
||||
}
|
Reference in New Issue
Block a user