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
F2902586: D9403.diff
Sat, Oct 5, 6:11 PM
Unknown Object (File)
Wed, Oct 2, 10:47 AM
Unknown Object (File)
Thu, Sep 12, 4:52 AM
Unknown Object (File)
Thu, Sep 12, 4:52 AM
Unknown Object (File)
Thu, Sep 12, 4:47 AM
Unknown Object (File)
Tue, Sep 10, 12:06 PM
Unknown Object (File)
Sep 2 2024, 5:04 AM
Unknown Object (File)
Aug 27 2024, 12:56 PM
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
Branch
ashoat/sql
Lint
No Lint Coverage
Unit
No Test Coverage