You are here

function schema_compare_table in Schema 8

Same name and namespace in other branches
  1. 5 schema.module \schema_compare_table()
  2. 6 schema.module \schema_compare_table()
  3. 7 schema.module \schema_compare_table()

Compares a reference specification (such as one returned by a module's hook_schema) to an inspected specification from the database.

Parameters

$inspect if not provided, the database is inspected.:

1 call to schema_compare_table()
SchemaRegressionTest::testInspectionConflict518210 in src/Tests/SchemaRegressionTest.php
Test API for adding tables

File

./schema.module, line 345
The Schema module provides functionality built on the Schema API.

Code

function schema_compare_table($ref, $inspect = NULL) {
  return;

  // @todo Refactor SchemaComparator and call from this function.
  $_db_type = db_driver();
  if (!isset($inspect)) {

    // TODO: Handle prefixing the D7 way
    //    $ref_name = db_prefix_tables('{' . $ref['name'] . '}');
    $ref_name = $ref['name'];
    $inspect = schema_dbobject()
      ->inspect(NULL, $ref_name);
    $inspect = $inspect[$ref['name']];
  }
  if (!isset($inspect)) {
    return array(
      'status' => 'missing',
    );
  }

  // Removed comparison code; most of it now resides in
  // SchemaComparator::compareTable().
}