Skip to content

Commit ce01de5

Browse files
committed
fix: table name when connection uses prefix
1 parent f0f5090 commit ce01de5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

src/SQLLoader.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66

77
use Illuminate\Contracts\Filesystem\Filesystem;
88
use Illuminate\Contracts\Process\ProcessResult;
9+
use Illuminate\Support\Facades\DB;
910
use Illuminate\Support\Facades\File;
1011
use Illuminate\Support\Facades\Process;
1112
use Illuminate\Support\Facades\Schema;
@@ -87,6 +88,8 @@ public function into(
8788

8889
$columns = array_merge($columns, $this->constants);
8990

91+
$table = DB::connection($this->getConnection())->getQueryGrammar()->wrapTable($table);
92+
9093
$this->tables[] = new TableDefinition(
9194
$table, $columns, $terminatedBy, $enclosedBy, $trailing, $formatOptions, $when, $csv, $withEmbedded
9295
);

0 commit comments

Comments
 (0)