@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Correct a bad Herald migration

Summary:
One of the migrations in rPa335004a91 (`20150730.herald.5.sql`) incorrectly swapped "add" and "add blocking" Differential Herald rules.

Swap any rules last modified before this patch was applied back. This is the best we can do without possibly overwriting more recent, intentional data. I'll issue some guidance on this in the changelog.

Test Plan:
- Made a rule, ran patch, no change.
- Changed rule modified time to a few months ago, ran patch, saw swap from non-blocking to blocking.

Reviewers: chad

Reviewed By: chad

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

+52
+52
resources/sql/autopatches/20150904.herald.1.sql
··· 1 + /* The "20150730.herald.5.sql" patch incorrectly swapped blocking and 2 + non-blocking "Add Reviewer" rules. This swaps back any rules which 3 + were last modified before the patch was applied. */ 4 + 5 + UPDATE {$NAMESPACE}_herald.herald_action a 6 + JOIN {$NAMESPACE}_herald.herald_rule r 7 + ON a.ruleID = r.id 8 + SET a.action = 'differential.reviewers.blocking.tmp' 9 + WHERE a.action = 'differential.reviewers.add' 10 + AND r.dateModified <= 11 + (SELECT applied FROM {$NAMESPACE}_meta_data.patch_status 12 + WHERE patch = 'phabricator:20150730.herald.5.sql'); 13 + 14 + UPDATE {$NAMESPACE}_herald.herald_action a 15 + JOIN {$NAMESPACE}_herald.herald_rule r 16 + ON a.ruleID = r.id 17 + SET a.action = 'differential.reviewers.add' 18 + WHERE a.action = 'differential.reviewers.blocking' 19 + AND r.dateModified <= 20 + (SELECT applied FROM {$NAMESPACE}_meta_data.patch_status 21 + WHERE patch = 'phabricator:20150730.herald.5.sql'); 22 + 23 + UPDATE {$NAMESPACE}_herald.herald_action a 24 + JOIN {$NAMESPACE}_herald.herald_rule r 25 + ON a.ruleID = r.id 26 + SET a.action = 'differential.reviewers.blocking' 27 + WHERE a.action = 'differential.reviewers.blocking.tmp'; 28 + 29 + 30 + UPDATE {$NAMESPACE}_herald.herald_action a 31 + JOIN {$NAMESPACE}_herald.herald_rule r 32 + ON a.ruleID = r.id 33 + SET a.action = 'differential.reviewers.self.blocking.tmp' 34 + WHERE a.action = 'differential.reviewers.self.add' 35 + AND r.dateModified <= 36 + (SELECT applied FROM {$NAMESPACE}_meta_data.patch_status 37 + WHERE patch = 'phabricator:20150730.herald.5.sql'); 38 + 39 + UPDATE {$NAMESPACE}_herald.herald_action a 40 + JOIN {$NAMESPACE}_herald.herald_rule r 41 + ON a.ruleID = r.id 42 + SET a.action = 'differential.reviewers.self.add' 43 + WHERE a.action = 'differential.reviewers.self.blocking' 44 + AND r.dateModified <= 45 + (SELECT applied FROM {$NAMESPACE}_meta_data.patch_status 46 + WHERE patch = 'phabricator:20150730.herald.5.sql'); 47 + 48 + UPDATE {$NAMESPACE}_herald.herald_action a 49 + JOIN {$NAMESPACE}_herald.herald_rule r 50 + ON a.ruleID = r.id 51 + SET a.action = 'differential.reviewers.self.blocking' 52 + WHERE a.action = 'differential.reviewers.self.blocking.tmp';