Skip to content

Commit

Permalink
We don't have a default value for log_timestamp.
Browse files Browse the repository at this point in the history
Looks like older MySQL versions automatically used NOW() on NOT NULL timestamp columns without default values. But this fails now and probably always failed with other databases.
  • Loading branch information
yunosh committed Aug 10, 2016
1 parent 210f4ae commit e0801ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion whups/lib/Driver/Sql.php
Original file line number Diff line number Diff line change
Expand Up @@ -3275,10 +3275,11 @@ public function updateLog($ticket_id, $user, array $changes = array(),
try {
$this->_db->insert(
'INSERT INTO whups_logs (transaction_id, '
. 'ticket_id, log_type, log_value, '
. 'ticket_id, log_timestamp, log_type, log_value, '
. 'log_value_num) VALUES (?, ?, ?, ?, ?)',
array((int)$transactionId,
(int)$ticket_id,
time(),
$type,
$this->_toBackend((string)$value),
(int)$value));
Expand Down

0 comments on commit e0801ec

Please sign in to comment.