Skip to content

Commit

Permalink
Set key type to string when uuids are used
Browse files Browse the repository at this point in the history
  • Loading branch information
stancl authored Apr 22, 2021
1 parent 0d14911 commit 3ee1e36
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/Database/Concerns/GeneratesIds.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,4 +26,9 @@ public function shouldGenerateId(): bool
{
return ! $this->getIncrementing();
}

public function getKeyType()
{
return $this->shouldGenerateId() ? 'string' : $this->keyType;
}
}

0 comments on commit 3ee1e36

Please sign in to comment.