Skip to content

Commit 22aed4f

Browse files
committed
better split of sql statements
1 parent cc8fdfb commit 22aed4f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/Infrastructure/Database.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -424,7 +424,7 @@ public static function getSqlStatementsFromSqlFile(string $sqlFilePath): array
424424
{
425425
$sqlFileContent = FileSystemUtils::readFile($sqlFilePath);
426426

427-
$sqlArray = explode(';', $sqlFileContent);
427+
$sqlArray = preg_split('/;\s*[\r\n]+/', $sqlFileContent, -1, PREG_SPLIT_NO_EMPTY);
428428

429429
$sqlStatements = array();
430430
foreach ($sqlArray as $sql) {

0 commit comments

Comments
 (0)