From 1bd682ad6279e88d8f3ee3b49082404fdd36dff5 Mon Sep 17 00:00:00 2001 From: Edgard Lorraine Messias Date: Wed, 27 Apr 2016 11:44:12 -0300 Subject: [PATCH] Fixed quoteTableName for reserved word without table prefix; --- src/Schema.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/Schema.php b/src/Schema.php index 9fc7ff9..f1e6024 100644 --- a/src/Schema.php +++ b/src/Schema.php @@ -83,7 +83,12 @@ public function createColumnSchemaBuilder($type, $length = null) public function quoteSimpleTableName($name) { - if (in_array(strtoupper($name), $this->reservedWords)) { + if($this->db->tablePrefix !== ''){ + return $name; + } + + $word = strtoupper(str_replace('%', '', $name)); + if (in_array($word, $this->reservedWords)) { return strpos($name, '"') !== false ? $name : '"' . $name . '"'; }