예제 #1
0
 public function testRollback()
 {
     foreach ($this->tables as $table) {
         $this->assertTableExists($table);
     }
     $rollback = new \yentu\commands\Rollback();
     $rollback->run(array());
     foreach ($this->tables as $table) {
         if ($table == 'yentu_history') {
             continue;
         }
         $this->assertTableDoesntExist($table);
     }
 }
예제 #2
0
파일: Migrate.php 프로젝트: codogh/yentu
 public function reverse()
 {
     if ($this->driver === null) {
         return;
     }
     ClearIce::output("Attempting to reverse all changes ... ");
     if ($this->getChanges() > 0) {
         ClearIce::pushOutputLevel(0);
         $rollback = new \yentu\commands\Rollback();
         $rollback->run(array());
         ClearIce::popOutputLevel();
     }
     ClearIce::output("OK\n");
 }