1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 03:50:54 +01:00
phorge-phorge/resources/sql/patches/074.affectedpath.sql
epriestley 43a3f4d234 Build an "affected path" index when attaching diffs to revisions
Summary: See T262. This creates the index on the Differential side which we need in order to execute this query efficiently on the Diffusion side.

Also renames "DiffusionGitPathIDQuery" to "DiffusionPathIDQuery", this query object has nothing to do with git.

Test Plan: Attached top-level and sub-level diffs to revisions and verified they populated the table with sensible data.

Reviewers: bmaurer, aravindn, fmoo, jungejason, nh, tuomaspelkonen, aran

CC:

Differential Revision: 931
2011-09-15 07:45:14 -07:00

8 lines
276 B
SQL

CREATE TABLE phabricator_differential.differential_affectedpath (
repositoryID INT UNSIGNED NOT NULL,
pathID INT UNSIGNED NOT NULL,
epoch INT UNSIGNED NOT NULL,
KEY (repositoryID, pathID, epoch),
revisionID INT UNSIGNED NOT NULL,
KEY (revisionID)
) ENGINE=InnoDB;