HomePhabricator

MetaMTA - lay some ground work for having an application

Description

MetaMTA - lay some ground work for having an application

Summary:
Ref T5791. This does a few bits there. Namely:

  • Adds PHID column to PhabricatorMetaMTAMail
    • Implements a PhabricatorMetaMTAMailPHIDType
    • Script to backpopulate them.
  • Makes PhabricatorMetaMTAMail implement PolicyInterface.
    • View policy is NOONE and the author and recipients have automatic view capabilities
    • No edit capability.
  • Adds a PhabricatorMetaMTAMailQuery for PhabricatorMetaMTAMail.

Test Plan: ran ./bin/storage upgrade successfully. commented on a maniphest task and verifed the metamta mail object in the database was created successfully with a shiny new phid

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

Maniphest Tasks: T5791

Differential Revision: https://secure.phabricator.com/D13394

Details

Event Timeline

Oh man, this is a massive migration.

accidentalbigdiff

Yeah, I have a few more like this in the sequence. I think they can be mostly skipped as this data is all garbage collected. I assumed they were okay as this table would be small ish.

@epriestley - FYI in case these are pillaging the databases too hard.

They were ~6 minutes each on this install.

I don't think you need to migrate historical edges. We could also reasonably just skip the historical author migration.

Basically, seems OK to me if we just throw away old data (it gets GC'd anwyay), although failing to backpopulate PHIDs feels a little dangerous.