|
|
|
@ -17,11 +17,11 @@ $connection = Database::getManager()->getConnection(); |
|
|
|
|
$sm = $connection->createSchemaManager(); |
|
|
|
|
$fromSchema = $sm->createSchema(); |
|
|
|
|
|
|
|
|
|
$tool = new \Doctrine\ORM\Tools\SchemaTool(Database::getManager()); |
|
|
|
|
$tool = new \Doctrine\ORM\Tools\SchemaTool($em); |
|
|
|
|
$metadatas = $em->getMetadataFactory()->getAllMetadata(); |
|
|
|
|
$toSchema = $tool->getSchemaFromMetadata($metadatas); |
|
|
|
|
$comparator = new \Doctrine\DBAL\Schema\Comparator(); |
|
|
|
|
$schemaDiff = $comparator->compareSchemas($fromSchema, $toSchema); |
|
|
|
|
|
|
|
|
|
$schemaDiff = $sm->createComparator()->compareSchemas($fromSchema, $toSchema); |
|
|
|
|
|
|
|
|
|
$sqlList = $schemaDiff->toSaveSql($connection->getDatabasePlatform()); |
|
|
|
|
$content = ''; |
|
|
|
|