Provide a new "hint" table for weird commits (rewritten, unreadable)
Summary: Ref T11522. This provides storage for tracking rewritten commits (new feature) and unreadable commits (existing feature, but really hacky). This doesn't do anything yet, just adds a table and a CLI tool for updating it. I'll document the tool once it works. You just pipe in some JSON, but I need to document the format. Test Plan: - Piped JSON for "none", "rewritten" and "unreadable" hints into `bin/repository hint`. - Examined the database to see that the table was written properly. - Tried to pipe bad JSON in, invalid hint types, etc. Got reasonable human-readable error messages. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11522 Differential Revision: https://secure.phabricator.com/D16434
This commit is contained in:
8
resources/sql/autopatches/20160824.repohint.01.hint.sql
Normal file
8
resources/sql/autopatches/20160824.repohint.01.hint.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE {$NAMESPACE}_repository.repository_commithint (
|
||||
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
|
||||
repositoryPHID VARBINARY(64) NOT NULL,
|
||||
oldCommitIdentifier VARCHAR(40) NOT NULL COLLATE {$COLLATE_TEXT},
|
||||
newCommitIdentifier VARCHAR(40) COLLATE {$COLLATE_TEXT},
|
||||
hintType VARCHAR(32) NOT NULL COLLATE {$COLLATE_TEXT},
|
||||
UNIQUE KEY `key_old` (repositoryPHID, oldCommitIdentifier)
|
||||
) ENGINE=InnoDB, COLLATE {$COLLATE_TEXT};
|
||||
Reference in New Issue
Block a user