Files
rustpad/migrations/mysql/0030_document_utf8mb4.sql
T
2026-08-05 10:29:31 +02:00

9 lines
647 B
SQL

-- Existing MySQL databases may have inherited utf8mb3 from the database default.
-- Convert all persisted document text to utf8mb4 so emoji and other 4-byte
-- Unicode characters can be stored in both current documents and revisions.
ALTER TABLE pads CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE revisions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE workspaces CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE notes CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;
ALTER TABLE note_revisions CONVERT TO CHARACTER SET utf8mb4 COLLATE utf8mb4_unicode_ci;