mirror of
https://github.com/silverstripe/silverstripe-framework
synced 2024-09-08 10:41:25 +02:00
Namespace all templates Move difflib and BBCodeParser2 to thirdparty Remove deprecated API marked for removal in 4.0
23 lines
554 B
PHP
23 lines
554 B
PHP
<?php
|
|
|
|
namespace SilverStripe\ORM\FieldType;
|
|
|
|
use SilverStripe\ORM\DB;
|
|
use SilverStripe\ORM\Connect\MySQLDatabase;
|
|
|
|
/**
|
|
* Supports double precision DB types
|
|
*/
|
|
class DBDouble extends DBFloat {
|
|
|
|
public function requireField() {
|
|
// HACK: MSSQL does not support double so we're using float instead
|
|
// @todo This should go into MSSQLDatabase ideally somehow
|
|
if(DB::get_conn() instanceof MySQLDatabase) {
|
|
DB::require_field($this->tableName, $this->name, "double");
|
|
} else {
|
|
DB::require_field($this->tableName, $this->name, "float");
|
|
}
|
|
}
|
|
}
|