Code snippets for symfony 1.x

Navigation

Refine Tags

Snippets tagged "migrationversion"

Get the actual version of Doctrine Migration

$migration_path = sfConfig::get('sf_lib_dir').DIRECTORY_SEPARATOR.'migration'.DIRECTORY_SEPARATOR.'doctrine';
    $doctrine_migration = new Doctrine_Migration($migration_path);
 
    $this->migration_current_version = $doctrine_migration->getCurrentVersion();
    $this->migration_latest_version  = $doctrine_migration->getLatestVersion();
 

Allow you to check if the database actually need to be migrated.

by Damien ALEXANDRE on 2010-11-19, tagged doctrine  migration  migrationversion