mirror of
https://github.com/silverstripe/silverstripe-postgresql
synced 2024-10-22 17:05:45 +02:00
Add bigint support
This commit is contained in:
parent
0c07807e1f
commit
d9699fa28d
@ -1117,6 +1117,32 @@ class PostgreSQLSchemaManager extends DBSchemaManager {
|
||||
return "integer{$values['arrayValue']}" . $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a bigint type-formatted string
|
||||
*
|
||||
* @param array $values Contains a tokenised list of info about this data type
|
||||
* @param boolean $asDbValue
|
||||
* @return string
|
||||
*/
|
||||
public function bigint($values, $asDbValue = false){
|
||||
|
||||
if(!isset($values['arrayValue'])) {
|
||||
$values['arrayValue']='';
|
||||
}
|
||||
|
||||
if($asDbValue) {
|
||||
return Array('data_type'=>'bigint', 'precision'=>'64');
|
||||
}
|
||||
|
||||
if($values['arrayValue']!='') {
|
||||
$default='';
|
||||
} else {
|
||||
$default=' default ' . (int)$values['default'];
|
||||
}
|
||||
|
||||
return "bigint{$values['arrayValue']}" . $default;
|
||||
}
|
||||
|
||||
/**
|
||||
* Return a datetime type-formatted string
|
||||
* For PostgreSQL, we simply return the word 'timestamp', no other parameters are necessary
|
||||
|
Loading…
Reference in New Issue
Block a user