mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
44302d2f07
Summary: Ref T2222. Ref T1460. Depends on D6260. This creates the new tables, but doesn't start using them. I added three new fields for {T1460}, to represent fixed/done/replied states. Test Plan: Ran storage upgrade. Reviewers: btrahan Reviewed By: btrahan CC: chad, aran Maniphest Tasks: T1460, T2222 Differential Revision: https://secure.phabricator.com/D6261
51 lines
2 KiB
SQL
51 lines
2 KiB
SQL
CREATE TABLE {$NAMESPACE}_differential.differential_transaction (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
objectPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
commentPHID VARCHAR(64) COLLATE utf8_bin,
|
|
commentVersion INT UNSIGNED NOT NULL,
|
|
transactionType VARCHAR(32) NOT NULL COLLATE utf8_bin,
|
|
oldValue LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
newValue LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
contentSource LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
metadata LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
|
|
UNIQUE KEY `key_phid` (phid),
|
|
KEY `key_object` (objectPHID)
|
|
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|
|
CREATE TABLE {$NAMESPACE}_differential.differential_transaction_comment (
|
|
id INT UNSIGNED NOT NULL PRIMARY KEY AUTO_INCREMENT,
|
|
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
transactionPHID VARCHAR(64) COLLATE utf8_bin,
|
|
authorPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
viewPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
editPolicy VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
commentVersion INT UNSIGNED NOT NULL,
|
|
content LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
contentSource LONGTEXT NOT NULL COLLATE utf8_bin,
|
|
isDeleted BOOL NOT NULL,
|
|
dateCreated INT UNSIGNED NOT NULL,
|
|
dateModified INT UNSIGNED NOT NULL,
|
|
|
|
revisionPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
changesetID INT UNSIGNED,
|
|
isNewFile BOOL NOT NULL,
|
|
lineNumber INT UNSIGNED NOT NULL,
|
|
lineLength INT UNSIGNED NOT NULL,
|
|
fixedState VARCHAR(12) COLLATE utf8_bin,
|
|
hasReplies BOOL NOT NULL,
|
|
replyToCommentPHID VARCHAR(64),
|
|
|
|
UNIQUE KEY `key_phid` (phid),
|
|
UNIQUE KEY `key_version` (transactionPHID, commentVersion),
|
|
UNIQUE KEY `key_draft` (authorPHID, revisionPHID, transactionPHID)
|
|
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|
|
|