1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-27 01:02:42 +01:00
phorge-phorge/resources/sql/autopatches/20141025.phriction.2.xaction.sql
Bob Trahan a9fc343d9e Phriction - start the move towards transactions and an editor
Summary:
This implements as little as possible to stick a working transactions + editor codepath in the basic create / edit flow. Aside from the transaction tables, this also required adding a mailKey to a phrictionDocument.

Future work would include adding more transactions types for things like "move" and all the pertinent support. Even future work is to add things like policies which will work easily in the transaction framework. Ref T4029.

Test Plan:
 - made a wiki doc
 - edit a wiki doc
 - had someone subscribe to a wiki doc and edited it

For all three, the edits worked, a reasonable email was sent out, and feed stories were generated.

 - made a wiki doc at a /location/like/this

document "stubs" were made as expected in /location and /location/like

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: chad, Korvin, epriestley

Maniphest Tasks: T4029

Differential Revision: https://secure.phabricator.com/D10756
2014-10-30 08:59:21 -07:00

16 lines
900 B
SQL

CREATE TABLE {$NAMESPACE}_phriction.phriction_transaction_comment (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
transactionPHID VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin DEFAULT NULL,
authorPHID VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
viewPolicy VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
editPolicy VARCHAR(64) CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
commentVersion INT UNSIGNED NOT NULL,
content LONGTEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
contentSource LONGTEXT CHARACTER SET utf8 COLLATE utf8_bin NOT NULL,
isDeleted TINYINT(1) NOT NULL,
dateCreated INT UNSIGNED NOT NULL,
dateModified INT UNSIGNED NOT NULL,
UNIQUE KEY `key_phid` (`phid`),
UNIQUE KEY `key_version` (`transactionPHID`,`commentVersion`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8