$table->uuid() creates UNKNOWN column type in Laravel 12 migrations with MariaDB, but works as CHAR(36) in MySQL #55009
Unanswered
filipegomes-acin
asked this question in
Q&A
Replies: 2 comments 2 replies
-
https://laravel.com/docs/11.x/upgrade#dedicated-mariadb-driver |
Beta Was this translation helpful? Give feedback.
1 reply
-
For example, my temporary solution is to make a macro for Blueprint in order to override the uuid method when the connection is MariaDB, but it doesn't work, so for now I will make a "Custom Uuid". |
Beta Was this translation helpful? Give feedback.
1 reply
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Laravel Version
12.2.0
PHP Version
8.4.2
Database Driver & Version
11.4.4-MariaDB-ubu2404
Description
In Laravel 12, using
$table->uuid()
in a migration correctly creates aCHAR(36)
column in MySQL, but in MariaDB, it results in anUNKNOWN
column type.Steps To Reproduce
On .env
DB_CONNECTION=mariadb
Create a migration:
Run migration:
php artisan migrate
Results:
CHAR(36)
(Works as expected)UNKNOWN
column typeBeta Was this translation helpful? Give feedback.
All reactions