Skip to content

Commit

Permalink
MySQL - Including an INT column in Pivot Table Causes invalid SQL Que…
Browse files Browse the repository at this point in the history
…ry (#267)

* add int

* Remove incorrect type

---------

Co-authored-by: Jonas Staudenmeir <[email protected]>
  • Loading branch information
adrianpaiva1 and staudenmeir authored Nov 3, 2024
1 parent 5ed86b9 commit 3c4c0d9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/Query/Grammars/Traits/CompilesMySqlAdjacencyLists.php
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ public function compilePivotColumnNullValue(string $typeName, string $type): str
}

$cast = match ($typeName) {
'bigint', 'boolean', 'integer', 'smallint', 'tinyint' => 'signed',
'bigint', 'boolean', 'int', 'smallint', 'tinyint' => 'signed',
'decimal' => "decimal($precision, $scale)",
'timestamp' => 'datetime',
'varchar' => 'char(65535)',
Expand Down

0 comments on commit 3c4c0d9

Please sign in to comment.