Skip to content

Commit

Permalink
Fixed quoteTableName for reserved word without table prefix;
Browse files Browse the repository at this point in the history
  • Loading branch information
edgardmessias committed Apr 27, 2016
1 parent bfa7fa3 commit 1bd682a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion src/Schema.php
Original file line number Diff line number Diff line change
Expand Up @@ -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 . '"';
}

Expand Down

0 comments on commit 1bd682a

Please sign in to comment.