You are here

function backup_db_history_insert in Backup Database 8

Inserts an export entry.

1 call to backup_db_history_insert()
BackupDatabaseLocalAdapter::export in src/Adapter/BackupDatabaseLocalAdapter.php
@inherit

File

./backup_db.module, line 14
backup_db.module

Code

function backup_db_history_insert($file) {
  $connection = \Drupal\Core\Database\Database::getConnection();
  return $connection
    ->insert('backup_db')
    ->fields(array(
    'fid',
    'name',
    'uri',
    'created',
  ))
    ->values(array(
    'fid' => $file['fid'],
    'name' => $file['name'],
    'uri' => $file['uri'],
    'created' => REQUEST_TIME,
  ))
    ->execute();
}