function schema_compare_schemas in Schema 8
Same name and namespace in other branches
- 5 schema.module \schema_compare_schemas()
- 6 schema.module \schema_compare_schemas()
- 7 schema.module \schema_compare_schemas()
Compares two complete schemas.
Parameters
$ref array is considered the reference copy:
$inspect array is compared against it. If $inspect is NULL, a: schema for the active database is generated and used.
3 calls to schema_compare_schemas()
- DefaultController::schema_compare in src/
Controller/ DefaultController.php - drush_schema_compare in ./
schema.drush.inc - Implements drush_COMMANDFILE_COMMANDNAME().
- schema_requirements in ./
schema.install - Implementation of hook_requirements().
File
- ./
schema.module, line 327 - The Schema module provides functionality built on the Schema API.
Code
function schema_compare_schemas($ref, $inspect = NULL) {
if (!isset($inspect)) {
$inspect = schema_dbobject()
->inspect();
}
$comparator = new SchemaComparator($ref, schema_dbobject());
$result = $comparator
->execute();
$result = new SchemaComparisonInfoBuilder($result);
return $result
->getInfoArray();
}