You are here

protected function MySQLiSource::getRawTables in Backup and Migrate 5.0.x

Get a list of tables in the db.

Overrides DatabaseSource::getRawTables

1 call to MySQLiSource::getRawTables()
MySQLiSource::exportToFile in src/Core/Source/MySQLiSource.php
Export this source to the given temp file.

File

src/Core/Source/MySQLiSource.php, line 317

Class

MySQLiSource
@package Drupal\backup_migrate\Core\Source

Namespace

Drupal\backup_migrate\Core\Source

Code

protected function getRawTables() {
  $out = [];

  // Get auto_increment values and names of all tables.
  $tables = $this
    ->query("SHOW TABLE STATUS");
  while ($tables && ($table = $tables
    ->fetch_assoc())) {

    // Lowercase the keys for consistency.
    $table = array_change_key_case($table);
    $out[$table['name']] = $table;
  }
  return $out;
}