1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-24 07:42:40 +01:00
phorge-phorge/resources/sql/patches/20130703.legalpaddocdenorm.sql
Bob Trahan 2d87bb29ac Legalpad - denormalize a field or two from DocumentBody to Document
Summary: this let's the list controller save a query. Fixes T3488. Note didn't bother denormalizing document body at all since I don't think we want to show a snippet.

Test Plan: viewed a list of legalpad documents - yay. viewed a legalpad document - yay. created a legalpad document - yay. edited a legalpad document - yay. edited with N authors - yay.

Reviewers: epriestley

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T3488

Differential Revision: https://secure.phabricator.com/D6382
2013-07-08 17:06:49 -07:00

8 lines
393 B
SQL

ALTER TABLE {$NAMESPACE}_legalpad.legalpad_document
ADD recentContributorPHIDs LONGTEXT NOT NULL COLLATE utf8_bin AFTER phid,
ADD contributorCount INT UNSIGNED NOT NULL DEFAULT 0 AFTER phid,
ADD title VARCHAR(255) NOT NULL COLLATE utf8_general_ci AFTER phid;
ALTER TABLE {$NAMESPACE}_legalpad.legalpad_document
DROP KEY key_creator,
ADD KEY key_creator (creatorPHID, dateModified);