Skip to content

Instantly share code, notes, and snippets.

View rafaelurben's full-sized avatar
🤡
Deploying on friday

Rafael rafaelurben

🤡
Deploying on friday
View GitHub Profile
@rafaelurben
rafaelurben / MariaDB-char32-to-uuid-converter-generator.sql
Last active December 12, 2025 14:46
MariaDB char(32) to native uuid migration generator
-- ============================================================================
-- UUID migration SQL GENERATOR for MariaDB 10.11.14
-- Produces statements to migrate UUID-like CHAR(32) columns to native UUID.
-- Usage: run this script in the target database. It will OUTPUT SQL statements
-- which you should REVIEW and run in the order indicated below.
--
-- This can be particularly helpful when migrating Django apps, as Django used
-- to use char(32) for UUIDFields but switched to uuid in django 5.0.
--
-- NOTE: Pay attention if you have non-uuid char(32) columns!