1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 08:20:57 +01:00
phorge-phorge/resources/sql/autopatches/20150701.herald.2.sql
epriestley 68de3dae9a Modularize all remaining Phriction Herald fields
Summary: Ref T8726.

Test Plan:
  - Created a rule using all the fields.
  - Updated documents, saw rule apply, reviewed transcript.
  - Migrated stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: eadler, epriestley

Maniphest Tasks: T8726

Differential Revision: https://secure.phabricator.com/D13514
2015-07-06 13:17:50 -07:00

20 lines
728 B
SQL

UPDATE {$NAMESPACE}_herald.herald_condition c
JOIN {$NAMESPACE}_herald.herald_rule r
ON c.ruleID = r.id
SET c.fieldName = 'phriction.document.title'
WHERE r.contentType = 'PhrictionDocumentHeraldAdapter'
AND c.fieldName = 'title';
UPDATE {$NAMESPACE}_herald.herald_condition c
JOIN {$NAMESPACE}_herald.herald_rule r
ON c.ruleID = r.id
SET c.fieldName = 'phriction.document.content'
WHERE r.contentType = 'PhrictionDocumentHeraldAdapter'
AND c.fieldName = 'body';
UPDATE {$NAMESPACE}_herald.herald_condition c
JOIN {$NAMESPACE}_herald.herald_rule r
ON c.ruleID = r.id
SET c.fieldName = 'phriction.document.author'
WHERE r.contentType = 'PhrictionDocumentHeraldAdapter'
AND c.fieldName = 'author';