Bolt\Storage\Database\Schema\SchemaCheck::checkDiff PHP Method

checkDiff() public method

Check a Comparator diff and store the messages that make it up.
public checkDiff ( string $tableName, Doctrine\DBAL\Schema\TableDiff $diff )
$tableName string
$diff Doctrine\DBAL\Schema\TableDiff
    public function checkDiff($tableName, TableDiff $diff)
    {
        $this->diffs[$tableName] = $diff;
        // Adds
        $this->getAddedColumns($tableName, $diff);
        $this->getAddedIndexes($tableName, $diff);
        $this->getAddedForeignKeys($tableName, $diff);
        // Changes
        $this->getChangedColumns($tableName, $diff);
        $this->getChangedIndexes($tableName, $diff);
        $this->getChangedForeignKeys($tableName, $diff);
        // Renames
        $this->getRenamedColumns($tableName, $diff);
        // Removes
        $this->getRemovedColumns($tableName, $diff);
        $this->getRemovedIndexes($tableName, $diff);
        $this->getRemovedForeignKeys($tableName, $diff);
        if (count($diff->removedColumns) > 0) {
            $hint = sprintf('The following fields in the `%s` table are not defined in your configuration. You can safely delete them manually if they are no longer needed: `%s`', $tableName, join('`, `', array_keys($diff->removedColumns)));
            $this->hints[] = $hint;
        }
    }