Fixed calls to wrong static functions and added some functionality to sandbox.
This commit is contained in:
parent
c8812542b1
commit
f2a7390c29
@ -169,7 +169,7 @@ class Doctrine_Facade
|
||||
{
|
||||
$directory = '/tmp/tmp_doctrine_models';
|
||||
|
||||
Doctrine::generateModelsFromDb($directory);
|
||||
Doctrine_Facade::generateModelsFromDb($directory);
|
||||
|
||||
$export = new Doctrine_Export_Schema();
|
||||
|
||||
@ -321,7 +321,7 @@ class Doctrine_Facade
|
||||
|
||||
if ($delete)
|
||||
{
|
||||
$models = Doctrine::getLoadedModels();
|
||||
$models = Doctrine_Facade::getLoadedModels();
|
||||
|
||||
foreach ($models as $model)
|
||||
{
|
||||
@ -351,7 +351,7 @@ class Doctrine_Facade
|
||||
|
||||
if ($delete)
|
||||
{
|
||||
$models = Doctrine::getLoadedModels();
|
||||
$models = Doctrine_Facade::getLoadedModels();
|
||||
|
||||
foreach ($models as $model)
|
||||
{
|
||||
|
@ -38,13 +38,15 @@ define('SANDBOX_PATH', dirname(__FILE__));
|
||||
define('DOCTRINE_PATH', dirname(SANDBOX_PATH) . DIRECTORY_SEPARATOR . 'lib');
|
||||
define('DATA_FIXTURES_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'fixtures');
|
||||
define('MODELS_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'models');
|
||||
define('MIGRATIONS_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'models');
|
||||
define('MIGRATIONS_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'migrations');
|
||||
define('SQL_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'data' . DIRECTORY_SEPARATOR . 'sql');
|
||||
define('YAML_SCHEMA_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'schema');
|
||||
define('DSN', 'sqlite:/' . SANDBOX_PATH . DIRECTORY_SEPARATOR . 'sandbox.db');
|
||||
define('DB_PATH', SANDBOX_PATH . DIRECTORY_SEPARATOR . 'sandbox.db');
|
||||
define('DSN', 'sqlite:' . DB_PATH);
|
||||
|
||||
require_once(DOCTRINE_PATH . DIRECTORY_SEPARATOR . 'Doctrine.php');
|
||||
|
||||
spl_autoload_register(array('Doctrine', 'autoload'));
|
||||
|
||||
Doctrine_Manager::connection(DSN, 'sandbox');
|
||||
$pdo = new PDO(DSN);
|
||||
Doctrine_Manager::connection($pdo, 'sandbox');
|
@ -10,7 +10,7 @@ abstract class BaseUser extends Doctrine_Record
|
||||
{
|
||||
$this->setTableName('user');
|
||||
$this->hasColumn('username', 'string', 255);
|
||||
$this->hasColumn('contact_id', 'integer', null);
|
||||
$this->hasColumn('contact_id', 'integer', 11);
|
||||
}
|
||||
|
||||
public function setUp()
|
||||
|
Binary file not shown.
@ -6,7 +6,7 @@ User:
|
||||
length: 255
|
||||
contact_id:
|
||||
type: integer
|
||||
size: 11
|
||||
length: 11
|
||||
relations:
|
||||
Contact:
|
||||
local: contact_id
|
||||
|
Loading…
Reference in New Issue
Block a user