Plugin for Adminer to convert binary-stored UUIDs to human-readable UUID format.
Tested on Adminer for MySQL 4.8.1 with MariaDB. Needs PHP 7.4 or newer.
- Converts binary-stored UUIDs to human-readable format in Select view.
- Support for search human-readable UUID format in Search section.
- Can be restricted for what columns can be used
- by table names (reg-ex)
- by column names (reg-ex)
- by column types (reg-ex)
- by column comment (reg-ex)
- By default this plugin is applied to all binary(16) columns.
- Optional conversion to lowercase or uppercase human-readable UUID format.
- Support for "IN" (multiple IDs) in search & better sanitizing
- Support for quick-edit
- Support for edit
<?php
$options = [
'convert_to_lowercase' => true,
'applicable_to' => [
'table_names' => '/.*/',
'column_names' => '/.*/',
'column_types' => '/^binary\(16\)$/i',
'comments' => '/.*/'
],
];
Due to original AdminerPlugin limitations this plugin needs to extend original Adminer class and then can be used by AdminerPlugin which should extends from this AdminerUuidPlugin.
- Download original adminer.php
- Download this plugin
- Create
index.php
in the same directory with this code:
<?php
function adminer_object() {
include_once "./AdminerUuidPlugin.php";
return new AdminerUuidPlugin();
}
// Original Adminer
include_once "./adminer.php";
- Download original adminer.php
- Download original plugins/plugin.php
- Create
index.php
in the same directory with code from official Adminer plugin documentation. - Modify
plugins/plugin.php
to extend it fromAdminerUuidPlugin
instead ofAdminer
itself.
class AdminerPlugin extends AdminerUuidPlugin {
// ...