lib/Doctrine/DBAL/Schema/Sequence.php
public function isAutoIncrementsFor(Table $table)
    {
        $primaryKey = $table->getPrimaryKey();

        if ($primaryKey === null) {
            return false;
        }

        $pkColumns = $primaryKey->getColumns();

        if (count($pkColumns) !== 1) {
            return false;
        }

        $column = $table->getColumn($pkColumns[0]);

        if (! $column->getAutoincrement()) {
            return false;
        }

        $sequenceName      = $this->getShortestName($table->getNamespaceName());
        $tableName         = $table->getShortestName($table->getNamespaceName());
        $tableSequenceName = sprintf('%s_%s_seq', $tableName, $column->getShortestName($table->getNamespaceName()));

        return $tableSequenceName === $sequenceName;
    }
public function isAutoIncrementsFor(Table $table)
    {
        $primaryKey = $table->getPrimaryKey();

        if ($primaryKey === null) {
            return false;
        }

        $pkColumns = $primaryKey->getColumns();

        if (count($pkColumns) !== 1) {
            return false;
        }

        $column = $table->getColumn($pkColumns[0]);

        if (! $column->getAutoincrement()) {
            return false;
        }

        $sequenceName      = $this->getShortestName($table->getNamespaceName());
        $tableName         = $table->getShortestName($table->getNamespaceName());
        $tableSequenceName = sprintf('%s_%s_seq', $tableName, $column->getShortestName($table->getNamespaceName()));

        return $tableSequenceName === $sequenceName;
    }
public function isAutoIncrementsFor ( Table $ table ) { $ primaryKey = $ table -> getPrimaryKey ( ) ; if ( $ primaryKey === null ) { return false ; } $ pkColumns = $ primaryKey -> getColumns ( ) ; if ( count ( $ pkColumns ) !== 1 ) { return false ; } $ column = $ table -> getColumn ( $ pkColumns [ 0 ] ) ; if ( ! $ column -> getAutoincrement ( ) ) { return false ; } $ sequenceName = $ this -> getShortestName ( $ table -> getNamespaceName ( ) ) ; $ tableName = $ table -> getShortestName ( $ table -> getNamespaceName ( ) ) ; $ tableSequenceName = sprintf ( '%s_%s_seq' , $ tableName , $ column -> getShortestName ( $ table -> getNamespaceName ( ) ) ) ; return $ tableSequenceName === $ sequenceName ; }
Checks if this sequence is an autoincrement sequence for a given table.

This is used inside the comparator to not report sequences as missing,
when the "from" schema implicitly creates the sequences.

@return bool
Checks if this sequence is an autoincrement sequence for a given table .