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