diff --git a/src/Migration/Migrator.php b/src/Migration/Migrator.php index bb199c9..6d3428d 100644 --- a/src/Migration/Migrator.php +++ b/src/Migration/Migrator.php @@ -153,7 +153,7 @@ public function checkIntegrity( $md5 = md5_file($file); if(is_null($migrationCount) - || $fileNumber <= $migrationCount) { + || $fileNumber <= $migrationCount) { $result = $this->dbClient->executeSql(implode("\n", [ "select `" . self::COLUMN_QUERY_HASH . "`", "from `{$this->tableName}`", @@ -222,6 +222,10 @@ public function performMigration( try { foreach($splitSqlQueryList as $sql) { + $sql = trim($sql); + if(!$sql) { + continue; + } $this->dbClient->executeSql($sql); }