1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-30 02:32:42 +01:00
phorge-phorge/resources/sql/autopatches/20160102.badges.award.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

10 lines
425 B
SQL

CREATE TABLE {$NAMESPACE}_badges.badges_award (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
badgePHID VARBINARY(64) NOT NULL,
recipientPHID VARBINARY(64) NOT NULL,
awarderPHID varbinary(64) NOT NULL,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
UNIQUE KEY `key_badge` (badgePHID, recipientPHID),
KEY `key_recipient` (recipientPHID)
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};