From 411dc3ede48d2d144524f5f14bbbd9bbfb604a2d Mon Sep 17 00:00:00 2001 From: Chris Thompson Date: Thu, 3 Dec 2020 08:35:45 -0500 Subject: [PATCH] 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 --- src/Schema/Builder.php | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/Schema/Builder.php b/src/Schema/Builder.php index baf8dc58..184f765e 100644 --- a/src/Schema/Builder.php +++ b/src/Schema/Builder.php @@ -17,6 +17,10 @@ class Builder extends MySqlBuilder */ protected function createBlueprint($table, Closure $callback = null) { - return new Blueprint($table, $callback); + $prefix = $this->connection->getConfig('prefix_indexes') + ? $this->connection->getConfig('prefix') + : ''; + + return new Blueprint($table, $callback, $prefix); } }