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)
Thu, Jul 4, 8:04 PM
Unknown Object (File)
Fri, Jun 21, 9:33 AM
Unknown Object (File)
Fri, Jun 21, 9:33 AM
Unknown Object (File)
Fri, Jun 21, 9:33 AM
Unknown Object (File)
Fri, Jun 21, 9:30 AM
Unknown Object (File)
Thu, Jun 20, 10:03 PM
Unknown Object (File)
May 13 2024, 8:21 AM
Unknown Object (File)
May 13 2024, 8:21 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