Skip to content

Commit 411dc3e

Browse files
Fixing connection prefix bug
The package's overloading of the `Blueprint` object pummels defined prefixes for the configured connection. This causes migrations to not respect table and index prefix. Reference https://github.com/laravel/framework/blob/8.x/src/Illuminate/Database/Schema/Builder.php#L347
1 parent 2ca9f2f commit 411dc3e

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

src/Schema/Builder.php

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,10 @@ class Builder extends MySqlBuilder
1717
*/
1818
protected function createBlueprint($table, Closure $callback = null)
1919
{
20-
return new Blueprint($table, $callback);
20+
$prefix = $this->connection->getConfig('prefix_indexes')
21+
? $this->connection->getConfig('prefix')
22+
: '';
23+
24+
return new Blueprint($table, $callback, $prefix);
2125
}
2226
}

0 commit comments

Comments
 (0)