1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-15 18:10:53 +01:00
phorge-phorge/resources/sql/autopatches/20160323.badgemigrate.sql
lkassianik 0330ea575d Converting badge recipients from Edge to BadgeAward table
Summary: Ref T8996, Convert badge recipients from Edges to actual BadgeAward objects

Test Plan: Create badge, award it to recipient. Make sure adding/removing recipients works. (Still need to migrate exisiting recipients to new table and need to create activity feed blurbs)

Reviewers: epriestley, #blessed_reviewers

Reviewed By: epriestley, #blessed_reviewers

Subscribers: chad, Korvin

Maniphest Tasks: T8996

Differential Revision: https://secure.phabricator.com/D15014
2016-03-26 14:03:48 -07:00

6 lines
310 B
SQL

/* PhabricatorBadgeHasRecipientEdgeType::TYPECONST = 59 */
INSERT IGNORE INTO {$NAMESPACE}_badges.badges_award
(badgePHID, recipientPHID, awarderPHID, dateCreated, dateModified)
SELECT src, dst, 'PHID-VOID-00000000000000000000', dateCreated, dateCreated
FROM {$NAMESPACE}_badges.edge WHERE type = 59;