HomePhabricator

Simplify adding new database patches

Description

Simplify adding new database patches

Summary:
Currently, to add new migration patches you need to:

  • Add a file to resources/sql/patches/; then
  • add an entry to src/infrastructure/storage/blahblah/BlahBlahBlah.php.

The second step isn't actually necessary, and we've been using this system for a long time without any issues arising.

Instead of requiring manual adjustments to the patch list, infer the patch specifications from the files on disk so you don't need to do step 2.

Also, simplify the existing data, which can mostly be derived from patch names. There are a few exceptions/errors, noted inline, which are preserved for compatibility.

Test Plan:

  • For the new genration of name and type, I added code to check that the old and new values were the same before converting. This caught the two inline exceptions ("emailtableport", "drydockresouces").
  • Added new patches to autopatches/ and ran bin/storage status to verify they got picked up correctly.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

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

Details

Provenance
epriestleyAuthored on Jan 6 2014, 8:17 PM
epriestleyPushed on Jan 6 2014, 8:17 PM
Reviewer
btrahan
Differential Revision
D7894: Simplify adding new database patches
Parents
rP543354981e52: Adjust transformed URI in CSS
Branches
Unknown
Tags
Unknown

Event Timeline