1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00
phorge-phorge/resources/sql/autopatches/20180215.phriction.06.statusvalue.sql
epriestley 143350fdba Give Phriction documents modern string status constants instead of numeric constants
Summary:
Depends on D19099. Ref T13077. Updates Phriction documents to string constants to make API interactions cleaner and statuses more practical to extend.

This does not seem to require any transaction migrations because none of the Phriction transactions actually store status values: status is always a side effect of other edits.

Test Plan: Created, edited, deleted, moved documents. Saw appropriate UI cues. Browsed and filtered documents by status in the index.

Maniphest Tasks: T13077

Differential Revision: https://secure.phabricator.com/D19100
2018-02-15 18:23:41 -08:00

11 lines
373 B
SQL

UPDATE {$NAMESPACE}_phriction.phriction_document
SET status = 'active' WHERE status = '0';
UPDATE {$NAMESPACE}_phriction.phriction_document
SET status = 'deleted' WHERE status = '1';
UPDATE {$NAMESPACE}_phriction.phriction_document
SET status = 'moved' WHERE status = '2';
UPDATE {$NAMESPACE}_phriction.phriction_document
SET status = 'stub' WHERE status = '3';