Commit 0b6aa395 authored by Jonathan.Wage's avatar Jonathan.Wage

Fixes for migration to allow migrating from current version to latest version.

parent c0818ef2
...@@ -284,7 +284,8 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ...@@ -284,7 +284,8 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
'dblib' => 'Doctrine_Connection_Mssql', 'dblib' => 'Doctrine_Connection_Mssql',
'firebird' => 'Doctrine_Connection_Firebird', 'firebird' => 'Doctrine_Connection_Firebird',
'informix' => 'Doctrine_Connection_Informix', 'informix' => 'Doctrine_Connection_Informix',
'mock' => 'Doctrine_Connection_Mock'); 'mock' => 'Doctrine_Connection_Mock',
'resource' => 'Doctrine_Connection_Resource');
if ( ! isset($drivers[$driverName])) { if ( ! isset($drivers[$driverName])) {
throw new Doctrine_Manager_Exception('Unknown driver ' . $driverName); throw new Doctrine_Manager_Exception('Unknown driver ' . $driverName);
} }
...@@ -322,6 +323,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera ...@@ -322,6 +323,7 @@ class Doctrine_Manager extends Doctrine_Configurable implements Countable, Itera
} }
switch ($parts['scheme']) { switch ($parts['scheme']) {
case 'resource':
case 'sqlite': case 'sqlite':
case 'sqlite2': case 'sqlite2':
case 'sqlite3': case 'sqlite3':
......
This diff is collapsed.
<?php <?php
require_once('playground.php'); require_once('playground.php');
require_once('connection.php');
$dsn = 'mysql://jwage:elite1baller@localhost/doctrine_playground'; class MigrationTest extends Doctrine_Record
$conn = Doctrine_Manager::connection($dsn); {
$manager = Doctrine_Manager::getInstance(); public function setTableDefinition()
{
$models = Doctrine::loadModels('test_models'); }
}
$manager->setAttribute(Doctrine::ATTR_EXPORT, Doctrine::EXPORT_ALL); $migrate = new Doctrine_Migration('/Users/jwage/Sites/doctrine_trunk/playground/migration_classes');
$migrate->migrate();
$conn->export->exportClasses($models); \ No newline at end of file
$query = new Doctrine_Search_Query('Article');
$query->search('test');
$results = $query->execute();
print_r($results);
\ No newline at end of file
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