| 1 | <?php |
| 2 | |
| 3 | namespace Wikimedia\Rdbms; |
| 4 | |
| 5 | use Doctrine\DBAL\Platforms\MySQLPlatform; |
| 6 | |
| 7 | class MWMySQLPlatform extends MySQLPlatform { |
| 8 | |
| 9 | /** |
| 10 | * @inheritDoc |
| 11 | */ |
| 12 | public function getFloatDeclarationSQL( array $column ) { |
| 13 | $double = $column['doublePrecision'] ?? false; |
| 14 | $unsigned = $column['unsigned'] ?? false; |
| 15 | |
| 16 | $sql = $double ? 'DOUBLE PRECISION' : 'FLOAT'; |
| 17 | |
| 18 | return $sql . ( $unsigned ? ' UNSIGNED' : '' ); |
| 19 | } |
| 20 | } |