Skip to content

Instantly share code, notes, and snippets.

@mridgway
Created September 29, 2010 17:37
Show Gist options
  • Save mridgway/603169 to your computer and use it in GitHub Desktop.
Save mridgway/603169 to your computer and use it in GitHub Desktop.
<?php
// $em is d2 entity manager
//
$class = array(
'Blog\Model\Article',
'User\Model\User'
);
$tool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
$metadata = array();
foreach ($classes AS $class) {
$metadata[] = $this->_em->getClassMetadata($class);
}
$tool->createSchema($metadata);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment