Skip to content

Commit

Permalink
fixup! fix: Database Migration does set current version in DB Friends…
Browse files Browse the repository at this point in the history
  • Loading branch information
alquerci committed Jul 3, 2024
1 parent 179df9e commit 884868e
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 13 deletions.
13 changes: 7 additions & 6 deletions tests/DoctrineTest/Doctrine_UnitTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -229,12 +229,7 @@ public function prepareTables() {
}
}

foreach ($this->tables as $table) {
try {
$this->conn->export->exportClasses(array($table));
} catch (Doctrine_Export_Exception $e) {
}
}
$this->conn->export->exportClasses($this->tables);

$this->objTable = $this->connection->getTable('User');
}
Expand Down Expand Up @@ -320,6 +315,12 @@ protected function openAndBindMysqlConnection()
$this->dbh = new PDO(getenv('MYSQL_DSN'));

$this->conn = $this->connection = $this->openAdditionalConnection($this->dbh);

$this->exc = new Doctrine_Connection_Mysql_Exception();

$this->unitOfWork = $this->connection->unitOfWork;
$this->connection->setListener(new Doctrine_EventListener());
$this->query = new Doctrine_Query($this->connection);
}

protected function openAdditionalConnection($adapter = null, $name = null)
Expand Down
12 changes: 5 additions & 7 deletions tests/MigrationTestCase.php
Original file line number Diff line number Diff line change
Expand Up @@ -32,13 +32,11 @@
*/
class Doctrine_Migration_TestCase extends Doctrine_UnitTestCase
{
public function prepareTables()
{
$this->tables[] = 'MigrationPhonenumber';
$this->tables[] = 'MigrationUser';
$this->tables[] = 'MigrationProfile';
parent::prepareTables();
}
protected $tables = array(
'MigrationPhonenumber',
'MigrationUser',
'MigrationProfile',
);

public function testMigration()
{
Expand Down

0 comments on commit 884868e

Please sign in to comment.