1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-14 02:42:40 +01:00
phorge-phorge/resources/sql/patches/113.lastreviewer.sql

13 lines
420 B
MySQL
Raw Normal View History

ALTER TABLE `{$NAMESPACE}_differential`.`differential_revision`
ADD `lastReviewerPHID` varchar(64) BINARY AFTER `authorPHID`;
UPDATE `{$NAMESPACE}_differential`.`differential_revision`
SET `lastReviewerPHID` = (
SELECT `authorPHID`
FROM `{$NAMESPACE}_differential`.`differential_comment`
WHERE `revisionID` = `differential_revision`.`id`
AND `action` IN ('accept', 'reject')
ORDER BY `id` DESC
LIMIT 1
);