silverstripe-framework/model/fieldtypes/Double.php

19 lines
448 B
PHP
Raw Normal View History

<?php
/**
2014-08-15 08:53:05 +02:00
*
* @package framework
* @subpackage model
*/
class Double extends Float {
2014-08-15 08:53:05 +02:00
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");
}
}
}