| SYSTEM INFORMATION | |
|---|---|
| OS type and version | 8.3.0 GPL |
| Webmin version | 2.670 |
Feature Request: Add Native UUID Data Type to the MariaDB Database Editor
Hello Virtualmin team,
I would like to report a missing data type in the MariaDB database editor: the native UUID column type is not available in the field-type selection.
Problem
I use Django with MariaDB and have encountered a compatibility issue when upgrading MariaDB.
MariaDB introduced the native UUID data type in version 10.7. Previously, Django’s UUIDField used CHAR(32) on MariaDB versions before 10.7. Newer Django versions use the native UUID type on MariaDB.
My production server currently runs MariaDB 10.6.23, where the column is:
uuid_url CHAR(32) NOT NULL
After upgrading MariaDB in my development environment, the existing column remained CHAR(32). Django then raised the following error when inserting a UUID:
django.db.utils.DataError: (1406, “Data too long for column ‘uuid_url’ at row 1”)
The issue was resolved by changing the column type to MariaDB’s native UUID type without losing the existing data:
ALTER TABLE your_table
MODIFY COLUMN uuid_url UUID NOT NULL;
However, this data type is not available in the Virtualmin MariaDB database editor, so the change cannot be performed through the GUI.
Why this matters
Django 6.1 has also dropped support for MariaDB versions older than 10.11. This makes MariaDB version compatibility and the ability to manage native data types increasingly important for Django users.
References:
Django 6.1 release notes: Django 6.1 release notes | Django documentation | Django
Django UUIDField documentation: Model field reference | Django documentation | Django
MariaDB UUID data type: UUID Data Type | Server | MariaDB Documentation
Expected behavior
Could you please add UUID to the available column types in the Virtualmin MariaDB database editor, allowing administrators to create and modify native UUID columns through the interface?
This would make it easier to maintain Django compatibility and migrate existing databases without having to resort to manual SQL commands.
Thank you for your work on Virtualmin.