From 3ee1e36653e0ff2f1973ff53e2c384e7129a7f34 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Samuel=20=C5=A0tancl?= Date: Thu, 22 Apr 2021 11:04:06 +0200 Subject: [PATCH] Set key type to string when uuids are used --- src/Database/Concerns/GeneratesIds.php | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/Database/Concerns/GeneratesIds.php b/src/Database/Concerns/GeneratesIds.php index bb3eadc9..dab29f3e 100644 --- a/src/Database/Concerns/GeneratesIds.php +++ b/src/Database/Concerns/GeneratesIds.php @@ -26,4 +26,9 @@ trait GeneratesIds { return ! $this->getIncrementing(); } + + public function getKeyType() + { + return $this->shouldGenerateId() ? 'string' : $this->keyType; + } }