Skip to content

Commit 1bd682a

Browse files
committed
Fixed quoteTableName for reserved word without table prefix;
1 parent bfa7fa3 commit 1bd682a

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

src/Schema.php

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,12 @@ public function createColumnSchemaBuilder($type, $length = null)
8383

8484
public function quoteSimpleTableName($name)
8585
{
86-
if (in_array(strtoupper($name), $this->reservedWords)) {
86+
if($this->db->tablePrefix !== ''){
87+
return $name;
88+
}
89+
90+
$word = strtoupper(str_replace('%', '', $name));
91+
if (in_array($word, $this->reservedWords)) {
8792
return strpos($name, '"') !== false ? $name : '"' . $name . '"';
8893
}
8994

0 commit comments

Comments
 (0)