lib/Doctrine/ORM/Tools/SchemaTool.php
public function getUpdateSchemaSql(array $classes, $saveMode = false)
    {
        $sm = $this->em->getConnection()->getSchemaManager();

        $fromSchema = $sm->createSchema();
        $toSchema   = $this->getSchemaFromMetadata($classes);

        $comparator = new Comparator();
        $schemaDiff = $comparator->compare($fromSchema, $toSchema);

        if ($saveMode) {
            return $schemaDiff->toSaveSql($this->platform);
        }

        return $schemaDiff->toSql($this->platform);
    }
public function getUpdateSchemaSql(array $classes, $saveMode = false)
    {
        $sm = $this->em->getConnection()->getSchemaManager();

        $fromSchema = $sm->createSchema();
        $toSchema   = $this->getSchemaFromMetadata($classes);

        $comparator = new Comparator();
        $schemaDiff = $comparator->compare($fromSchema, $toSchema);

        if ($saveMode) {
            return $schemaDiff->toSaveSql($this->platform);
        }

        return $schemaDiff->toSql($this->platform);
    }
public function getUpdateSchemaSql ( array $ classes , $ saveMode = false ) { $ sm = $ this -> em -> getConnection ( ) -> getSchemaManager ( ) ; $ fromSchema = $ sm -> createSchema ( ) ; $ toSchema = $ this -> getSchemaFromMetadata ( $ classes ) ; $ comparator = new Comparator ( ) ; $ schemaDiff = $ comparator -> compare ( $ fromSchema , $ toSchema ) ; if ( $ saveMode ) { return $ schemaDiff -> toSaveSql ( $ this -> platform ) ; } return $ schemaDiff -> toSql ( $ this -> platform ) ; }
Gets the sequence of SQL statements that need to be performed in order
to bring the given class mappings in-synch with the relational schema.

@param ClassMetadata[] $classes  The classes to consider.
@param bool            $saveMode If TRUE, only generates SQL for a partial update
that does not include SQL for dropping assets which are scheduled for deletion.

@return string[] The sequence of SQL statements.
Gets the sequence of SQL statements that need to be performed in order to bring the given class mappings in - synch with the relational schema .