mirror of
https://github.com/silverstripe/silverstripe-sqlite3
synced 2024-10-22 15:05:37 +00:00
MINOR added default value for decimals
This commit is contained in:
parent
b2968dc888
commit
8564804d77
@ -606,7 +606,8 @@ class SQLite3Database extends SS_Database {
|
|||||||
*/
|
*/
|
||||||
public function decimal($values, $asDbValue=false){
|
public function decimal($values, $asDbValue=false){
|
||||||
|
|
||||||
return "NUMERIC NOT NULL DEFAULT 0";
|
$default = isset($values['default']) && is_numeric($values['default']) ? $values['default'] : 0;
|
||||||
|
return "NUMERIC NOT NULL DEFAULT " . $default;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user