forked from GNUsocial/gnu-social
Database fields with timestamp type now allow CURRENT_TIMESTAMP to be set as default value
Add default values to created and modified columns of Profile_list table to fix issue #338
This commit is contained in:
@@ -790,7 +790,7 @@ class Schema
|
||||
|
||||
function quoteDefaultValue($cd)
|
||||
{
|
||||
if ($cd['type'] == 'datetime' && $cd['default'] == 'CURRENT_TIMESTAMP') {
|
||||
if (($cd['type'] == 'datetime' || $cd['type'] == 'timestamp') && $cd['default'] == 'CURRENT_TIMESTAMP') {
|
||||
return $cd['default'];
|
||||
} else {
|
||||
return $this->quoteValue($cd['default']);
|
||||
|
Reference in New Issue
Block a user