23 lines
1.2 KiB
PHP
23 lines
1.2 KiB
PHP
<?php
|
|
require_once realpath(dirname(__FILE__)).'/../../config/prepend.php';
|
|
require_once 'Doctrine.php';
|
|
spl_autoload_register(array('Doctrine', 'autoload'));
|
|
|
|
$graydonConn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/graydon', 'graydon');
|
|
$intersudConn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/intersud', 'intersud');
|
|
$sdv1Conn = Doctrine_Manager::connection('mysql://'.MYSQL_USER.':'.MYSQL_PASS.'@'.MYSQL_HOST.'/sdv1', 'sdv1');
|
|
|
|
$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);
|
|
|
|
$manager->setCurrentConnection('graydon');
|
|
Doctrine::generateModelsFromDb(realpath(dirname(__FILE__)).'/models/graydon', array('graydon'));
|
|
|
|
$manager->setCurrentConnection('intersud');
|
|
Doctrine::generateModelsFromDb(realpath(dirname(__FILE__)).'/models/intersud', array('intersud'));
|
|
|
|
$manager->setCurrentConnection('sdv1');
|
|
Doctrine::generateModelsFromDb(realpath(dirname(__FILE__)).'/models/sdv1', array('sdv1'));
|
|
?>
|