Page MenuHomePhorge

Remove the onboard "mailKey" from Paste
Needs ReviewPublic

Authored by mainframe98 on Thu, Feb 27, 19:16.
Tags
None
Referenced Files
F3220154: D25900.1741800441.diff
Tue, Mar 11, 17:27
F3216993: D25900.1741725850.diff
Mon, Mar 10, 20:44
F3216350: D25900.1741692823.diff
Mon, Mar 10, 11:33
F3216327: D25900.1741691922.diff
Mon, Mar 10, 11:18
F3216216: D25900.1741685724.diff
Mon, Mar 10, 09:35
F3216041: D25900.1741676890.diff
Mon, Mar 10, 07:08
F3214628: D25900.1741572500.diff
Sun, Mar 9, 02:08
F3029943: D25900.1740844520.diff
Fri, Feb 28, 15:55

Details

Reviewers
None
Group Reviewers
O1: Blessed Committers
Summary

See T13065 and rP1e2bc7775bc4.

Intended to cover the gap left by D25899.
The actual amount of impacted installations should
be 0, but the migration makes sure all pastes have
a mail key regardless.

Test Plan
  • Create a paste
  • Run ./bin/storage upgrade
  • Check that the mailkey is in the new table correctly

Diff Detail

Repository
rP Phorge
Branch
migrate-paste-to-mailkey-table
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 1752
Build 1752: arc lint + arc unit

Event Timeline

You know better than me the context. Is there a possibility that an installation is already without that column?

If you think yes, maybe DROP COLUMN IF EXISTS

resources/sql/autopatches/20250227.paste.02.mailkey.sql
2

I think the canonical way is DROP COLUMN

You know better than me the context. Is there a possibility that an installation is already without that column?

Theoretically, yes, but in practice no, provided they ran storage upgrade. After a certain point, the deprecations in newer PHP versions would prevent you from running the migrations anyway. Afterwards, the paste table would have been renamed, breaking the upgrade entirely.

(Also I forgot to drop the column from PhabricatorPaste - whoops)

resources/sql/autopatches/20250227.paste.02.mailkey.sql
2

I just copied from 20181220.pholio.02.dropmailkey.sql in rP1e2bc7775bc4.

Remove the mailKey column from PhabricatorPaste