Skip to content

Instantly share code, notes, and snippets.

@mridgway
Created August 24, 2010 15:59
Show Gist options
  • Save mridgway/547793 to your computer and use it in GitHub Desktop.
Save mridgway/547793 to your computer and use it in GitHub Desktop.
<?php
$em = $this->_em = \Zend_Registry::getInstance()->get('doctrine');
$this->_tool = new \Doctrine\ORM\Tools\SchemaTool($this->_em);
$this->_classes = array (
$em->getClassMetadata('Core\Model\Module'),
$em->getClassMetadata('Core\Model\Module\Block'),
$em->getClassMetadata('Core\Model\Module\Content'),
$em->getClassMetadata('Core\Model\AbstractPage'),
$em->getClassMetadata('Core\Model\Page'),
$em->getClassMetadata('Core\Model\Template'),
$em->getClassMetadata('Core\Model\Layout'),
$em->getClassMetadata('Core\Model\Layout\Location'),
$em->getClassMetadata('Core\Model\PageRoute'),
$em->getClassMetadata('Core\Model\Route'),
$em->getClassMetadata('Core\Model\Block'),
$em->getClassMetadata('Core\Model\Block\Config\Value'),
$em->getClassMetadata('Core\Model\Content'),
$em->getClassMetadata('Core\Model\View')
$em->getClassMetadata('Core\Model\Content\Placeholder'),
$em->getClassMetadata('Core\Model\Content\Text')
);
$this->_tool->createSchema($this->_classes);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment