Page MenuHomePhabricator

[keyserver] Modify filename column in MariaDB uploads table to utf8
ClosedPublic

Authored by ashoat on Oct 6 2023, 12:02 PM.
Tags
None
Referenced Files
Unknown Object (File)
Fri, Nov 29, 2:02 PM
Unknown Object (File)
Fri, Nov 29, 11:45 AM
Unknown Object (File)
Fri, Nov 15, 1:11 PM
Unknown Object (File)
Sat, Nov 2, 8:49 AM
Unknown Object (File)
Nov 1 2024, 8:58 AM
Unknown Object (File)
Nov 1 2024, 8:58 AM
Unknown Object (File)
Nov 1 2024, 8:56 AM
Unknown Object (File)
Nov 1 2024, 3:47 AM
Subscribers

Details

Summary

Instead of just updating the filename column, I updated the default to utf8_mb4 (the "real" utf8 encoding in MariaDB). That way if we create a future column, it will default to utf8.

I think added explicit annotations to keep the other columns the same, to avoid any weird effects.

Test Plan
  1. I tested that the migration works in my local environment
  2. I tested that the setup-db.js query works by copy-pasting it into a MariaDB console in my local environment (with a different name for the table)
  3. I then ran SHOW FULL COLUMNS FROM on both the migration result and the setup-db.js result to confirm they were the same: https://gist.github.com/Ashoat/0494344fa432995cf0219aed25fcb321
  4. Finally, I confirmed that my repro (drag-n-drop a screenshot on macOS before it saves to desktop) no longer repro'd

Diff Detail

Repository
rCOMM Comm
Lint
Lint Not Applicable
Unit
Tests Not Applicable