@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Remove obsolete columns from RefCursor table

Summary:
Ref T11823. This change isn't standalone, but prepares for the more involved code change by dropping obsolete columns from the RefCursor table and adding the unique key we need to prevent the ambiguous/duplicate refs issue.

This data was moved to the RefPosition table in D18612.

Test Plan: Ran storage upgrade. See next revision for more substantial testing of this change series.

Reviewers: amckinley

Reviewed By: amckinley

Maniphest Tasks: T11823

Differential Revision: https://secure.phabricator.com/D18613

+8 -5
+2
resources/sql/autopatches/20170915.ref.02.drop.id.sql
··· 1 + ALTER TABLE {$NAMESPACE}_repository.repository_refcursor 2 + DROP COLUMN commitIdentifier;
+2
resources/sql/autopatches/20170915.ref.03.drop.closed.sql
··· 1 + ALTER TABLE {$NAMESPACE}_repository.repository_refcursor 2 + DROP COLUMN isClosed;
+2
resources/sql/autopatches/20170915.ref.04.uniq.sql
··· 1 + ALTER TABLE {$NAMESPACE}_repository.repository_refcursor 2 + ADD UNIQUE KEY `key_ref` (repositoryPHID, refType, refNameHash);
+2 -5
src/applications/repository/storage/PhabricatorRepositoryRefCursor.php
··· 19 19 protected $refNameHash; 20 20 protected $refNameRaw; 21 21 protected $refNameEncoding; 22 - protected $commitIdentifier; 23 - protected $isClosed = 0; 24 22 25 23 private $repository = self::ATTACHABLE; 26 24 ··· 34 32 self::CONFIG_COLUMN_SCHEMA => array( 35 33 'refType' => 'text32', 36 34 'refNameHash' => 'bytes12', 37 - 'commitIdentifier' => 'text40', 38 35 'refNameEncoding' => 'text16?', 39 - 'isClosed' => 'bool', 40 36 ), 41 37 self::CONFIG_KEY_SCHEMA => array( 42 - 'key_cursor' => array( 38 + 'key_ref' => array( 43 39 'columns' => array('repositoryPHID', 'refType', 'refNameHash'), 40 + 'unique' => true, 44 41 ), 45 42 ), 46 43 ) + parent::getConfiguration();