1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-30 01:10:58 +01:00
phorge-phorge/resources/sql/autopatches/20140325.push.1.event.sql
epriestley a5f55d506f Provide a real object ("PhabricatorRepositoryPushEvent") to represent an entire push transaction
Summary:
Ref T4677. Currently, we record individual actions in a push as PhabricatorRepositoryPushLogs, but tie them together only loosely with a `transactionKey`.

Provide a real PushEvent object, and move some of the denormalized fields to it. This primarily just gives us more robust infrastructure for building, e.g., email about pushes, for T4677, since we can act on real PHIDs rather than passing awkward identifiers around.

Test Plan:
  - Performed migration.
  - Looked at database for consistency.
  - Browsed/queried push logs.
  - Pushed a bunch of stuff.

Reviewers: btrahan

Reviewed By: btrahan

Subscribers: epriestley

Maniphest Tasks: T4677

Differential Revision: https://secure.phabricator.com/D8615
2014-03-26 13:51:06 -07:00

15 lines
559 B
SQL

CREATE TABLE {$NAMESPACE}_repository.repository_pushevent (
id INT UNSIGNED NOT NULL AUTO_INCREMENT PRIMARY KEY,
phid VARCHAR(64) NOT NULL COLLATE utf8_bin,
repositoryPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
epoch INT UNSIGNED NOT NULL,
pusherPHID VARCHAR(64) NOT NULL COLLATE utf8_bin,
remoteAddress INT UNSIGNED,
remoteProtocol VARCHAR(32),
rejectCode INT UNSIGNED NOT NULL,
rejectDetails VARCHAR(64) COLLATE utf8_bin,
UNIQUE KEY `key_phid` (phid),
KEY `key_repository` (repositoryPHID)
) ENGINE=InnoDB, COLLATE=utf8_general_ci;