/** * 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; }
/** * @return $this */ public function commit() { if (SQL::isTransactionActive()) { SQL::confirmTransaction(); } return $this; }