die("Error: The version option must be either a timestamp (e.g. 101129_185401)\nor the full name of a migration (e.g. m101129_185401_create_user_table).\n");
die("Error: The version option must be either a timestamp (e.g. 101129_185401)\nor the full name of a migration (e.g. m101129_185401_create_user_table).\n");
$db=$this->getDb();
$db=$this->getDb();
// try mark up
$migrations=$this->getNewMigrations();
foreach($migrationsas$i=>$migration)
{
if(strpos($migration,$version.'_')===0)
{
if($this->confirm("Set migration history at $originalVersion?"))
{
$command=$db->createCommand();
for($j=0;$j<=$i;++$j)
{
$migrations=$this->getNewMigrations();
foreach($migrationsas$i=>$migration){
if(strpos($migration,$version.'_')===0){
if($this->confirm("Set migration history at $originalVersion?")){
$command=$db->createCommand();
for($j=0;$j<=$i;++$j){
$command->insert($this->migrationTable,array(
'version'=>$migrations[$j],
'apply_time'=>time(),
'version'=>$migrations[$j],
'apply_time'=>time(),
));
}
echo"The migration history is set at $originalVersion.\nNo actual migration was performed.\n";
...
...
@@ -303,20 +285,16 @@ class MigrateController extends Controller
die("Error: CMigrationCommand.connectionID '{$this->connectionID}' is invalid. Please make sure it refers to the ID of a CDbConnection application component.\n");
...
...
@@ -468,9 +429,8 @@ class MigrateController extends Controller