1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-05 21:26:14 +01:00
phorge-phorge/resources/sql/autopatches/20170725.legalpad.date.01.sql

3 lines
85 B
MySQL
Raw Normal View History

Properly version Legalpad documents Summary: Fixes T12933. This now creates a new DocumentBody when creating or editing a legalpad document. Test Plan: Create a new document, edit document. Check database that version is saved as new row, and timestamps are correct. ```mysql> select * from legalpad_documentbody; +----+--------------------------------+--------------------------------+--------------------------------+---------+---------------+--------+-------------+--------------+ | id | phid | creatorPHID | documentPHID | version | title | text | dateCreated | dateModified | +----+--------------------------------+--------------------------------+--------------------------------+---------+---------------+--------+-------------+--------------+ | 1 | PHID-LEGB-nsgzqklzfmjahlcgobm7 | PHID-USER-72xwu7eurrpsu2kxgrvw | PHID-LEGD-v7mc3xyithjvbiqeksbj | 2 | Legal Title 1 | Body 2 | 1501037011 | 1501037081 | | 2 | PHID-LEGB-2kaytwmjusljib6pjycc | PHID-USER-72xwu7eurrpsu2kxgrvw | PHID-LEGD-v7mc3xyithjvbiqeksbj | 3 | Legal Title 1 | Body 3 | 1501037521 | 1501037521 | | 3 | PHID-LEGB-h6q6bi42w4rgxrhk3qdb | PHID-USER-72xwu7eurrpsu2kxgrvw | PHID-LEGD-7gxuhafvkoy2izkv4gdd | 1 | New 2 | asdf | 1501037553 | 1501037553 | +----+--------------------------------+--------------------------------+--------------------------------+---------+---------------+--------+-------------+--------------+ 3 rows in set (0.00 sec)``` Reviewers: epriestley Reviewed By: epriestley Subscribers: tmakarios, Korvin Maniphest Tasks: T12933 Differential Revision: https://secure.phabricator.com/D18280
2017-07-26 18:29:47 +02:00
UPDATE {$NAMESPACE}_legalpad.legalpad_documentbody
SET dateCreated = dateModified;