12 lines
760 B
PHP
12 lines
760 B
PHP
<?php
|
|
require_once realpath(dirname(__FILE__)).'/../../config/prepend.php';
|
|
require_once 'Doctrine.php';
|
|
spl_autoload_register(array('Doctrine', 'autoload'));
|
|
//$conn = Doctrine_Manager::connection('mysql://root:@localhost/graydon', 'graydon');
|
|
$conn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/graydon', 'graydon');
|
|
$manager = Doctrine_Manager::getInstance();
|
|
$manager->setAttribute( Doctrine::ATTR_MODEL_LOADING, Doctrine::MODEL_LOADING_CONSERVATIVE);
|
|
$manager->setAttribute( Doctrine::ATTR_AUTO_ACCESSOR_OVERRIDE, TRUE );
|
|
$manager->setAttribute( Doctrine::ATTR_USE_NATIVE_ENUM, TRUE);
|
|
Doctrine::generateModelsFromDb(realpath(dirname(__FILE__)).'/models', array('graydon'), array('generateTableClasses' => true));
|
|
?>
|