Esempio n. 1
0
 /**
  * Run one migration .sql file
  * @param string $filename
  * @return $this
  */
 private function runMigrationFile($filename)
 {
     SQL::startTransaction();
     // Force SQL run without errors
     @q(file_get_contents(DIR_MIGRATIONS . $filename));
     SQL::confirmTransaction();
     return $this;
 }
Esempio n. 2
0
 /**
  * @return $this
  */
 public function commit()
 {
     if (SQL::isTransactionActive()) {
         SQL::confirmTransaction();
     }
     return $this;
 }