mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-30 02:32:42 +01:00
b1c4a258c9
Summary: Ref T2769. I'm planning to keep this pretty simple, but we have this ad-hoc edit log for rules already and some other mess that we can clean up. Test Plan: No effect yet; see future changes. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2769 Differential Revision: https://secure.phabricator.com/D6654
40 lines
1.6 KiB
SQL
40 lines
1.6 KiB
SQL
CREATE TABLE {$NAMESPACE}_herald.herald_ruletransaction (
|
|
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}_herald.herald_ruletransaction_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,
|
|
|
|
UNIQUE KEY `key_phid` (phid),
|
|
UNIQUE KEY `key_version` (transactionPHID, commentVersion)
|
|
|
|
) ENGINE=InnoDB, COLLATE utf8_general_ci;
|