Commit f2a7390c authored by Jonathan.Wage's avatar Jonathan.Wage

Fixed calls to wrong static functions and added some functionality to sandbox.

parent c8812542
......@@ -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');
\ No newline at end of file
$pdo = new PDO(DSN);
Doctrine_Manager::connection($pdo, 'sandbox');
\ No newline at end of file
......@@ -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()
......
No preview for this file type
......@@ -6,7 +6,7 @@ User:
length: 255
contact_id:
type: integer
size: 11
length: 11
relations:
Contact:
local: contact_id
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment