mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-21 13:00:56 +01:00
caa6fdf56d
Summary: Ref T4195. This log serves two purposes: - It's a log, so you can see what happened. Particularly, in Git/Hg, there is no other way to tell: - Who //pushed// a change (vs committed / authored)? - When was a change pushed? - What was the old value of some tag/branch before someone destroyed it? - We can hand these objects off to Herald to implement pre-commit rules. This is a very basic implementation, but gets some data written and has a basic UI for it. Test Plan: {F87339} Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T4195 Differential Revision: https://secure.phabricator.com/D7705
25 lines
1,013 B
SQL
25 lines
1,013 B
SQL
CREATE TABLE {$NAMESPACE}_repository.repository_pushlog (
|
|
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
|
epoch INT UNSIGNED NOT NULL,
|
|
repositoryPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
pusherPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
|
|
remoteAddress INT UNSIGNED,
|
|
remoteProtocol VARCHAR(32),
|
|
transactionKey CHAR(12) NOT NULL COLLATE latin1_bin,
|
|
refType VARCHAR(12) NOT NULL COLLATE utf8_bin,
|
|
refNameHash VARCHAR(12) COLLATE latin1_bin,
|
|
refNameRaw LONGTEXT COLLATE latin1_bin,
|
|
refNameEncoding VARCHAR(16) COLLATE utf8_bin,
|
|
refOld VARCHAR(40) COLLATE latin1_bin,
|
|
refNew VARCHAR(40) NOT NULL COLLATE latin1_bin,
|
|
mergeBase VARCHAR(40) COLLATE latin1_bin,
|
|
changeFlags INT UNSIGNED NOT NULL,
|
|
rejectCode INT UNSIGNED NOT NULL,
|
|
rejectDetails VARCHAR(64) COLLATE utf8_bin,
|
|
|
|
KEY `key_repository` (repositoryPHID),
|
|
KEY `key_ref` (repositoryPHID, refNew),
|
|
KEY `key_pusher` (pusherPHID),
|
|
KEY `key_name` (repositoryPHID, refNameHash)
|
|
|
|
) ENGINE=InnoDB, COLLATE=utf8_general_ci;
|