Laravel Translations UI package provides a user-friendly interface for managing translations in your Laravel application. It simplifies tasks such as adding, editing, deleting, and exporting translations. The package also includes a handy search feature and the ability to invite collaborators for easy translation management
MIT License
648
stars
91
forks
source link
sync uuid creation column with the new upgrade #130
When using MariaDB as the database driver for Laravel Translations UI, the migration fails due to an incompatibility with the uuid column type. This occurs because MariaDB doesn't natively support the uuid data type.
Error
Running the migration 2024_09_05_100938_create_phrases_table results in the following error:
SQLSTATE[HY000]: General error: 4161 Unknown data type: 'uuid'
Solution
Update the migration file to use char(36) instead of uuid() for MariaDB compatibility. This change aligns with Laravel's recommendation for handling UUIDs in MariaDB as mentioned in the upgrade guide.
Changes
In the migration file create_phrases_table, replace:
$table->uuid();
with:
$table->char('uuid', 36);
Benefits
Ensures compatibility with MariaDB while maintaining UUID functionality
Follows Laravel's recommended approach for handling UUIDs in MariaDB environments
Allows successful migration and installation of Laravel Translations UI with MariaDB
Testing
[x] Tested with MariaDB to ensure successful migration
[x] Verified UUID generation and storage work as expected
[ ] Tested with other supported databases to ensure no regression
Additional Notes
This change is specific to MariaDB compatibility and should not affect the functionality of the package when used with other database systems that support the native uuid() method.
Fix UUID column type for MariaDB compatibility
Problem
When using MariaDB as the database driver for Laravel Translations UI, the migration fails due to an incompatibility with the
uuid
column type. This occurs because MariaDB doesn't natively support theuuid
data type.Error
Running the migration
2024_09_05_100938_create_phrases_table
results in the following error:Solution
Update the migration file to use
char(36)
instead ofuuid()
for MariaDB compatibility. This change aligns with Laravel's recommendation for handling UUIDs in MariaDB as mentioned in the upgrade guide.Changes
In the migration file
create_phrases_table
, replace:with:
Benefits
Testing
Additional Notes
This change is specific to MariaDB compatibility and should not affect the functionality of the package when used with other database systems that support the native
uuid()
method.Closes #[Issue Number]