mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-02 09:58:24 +01:00
Remove all remaining readers and writers for TABLE_COMMIT
Summary: Depends on D20459. Ref T13276. I'll file a followup to actually destroy the table. Test Plan: - Grepped for `TABLE_COMMIT`. - Ran `bin/storage upgrade -f`, got a clean bill of health. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13276 Differential Revision: https://secure.phabricator.com/D20461
This commit is contained in:
parent
ec0085fd0c
commit
42c02557e4
3 changed files with 4 additions and 16 deletions
|
@ -53,8 +53,6 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
private $flags = array();
|
private $flags = array();
|
||||||
private $forceMap = array();
|
private $forceMap = array();
|
||||||
|
|
||||||
const TABLE_COMMIT = 'differential_commit';
|
|
||||||
|
|
||||||
const RELATION_REVIEWER = 'revw';
|
const RELATION_REVIEWER = 'revw';
|
||||||
const RELATION_SUBSCRIBED = 'subd';
|
const RELATION_SUBSCRIBED = 'subd';
|
||||||
|
|
||||||
|
@ -1021,12 +1019,6 @@ final class DifferentialRevision extends DifferentialDAO
|
||||||
|
|
||||||
$conn_w = $this->establishConnection('w');
|
$conn_w = $this->establishConnection('w');
|
||||||
|
|
||||||
queryfx(
|
|
||||||
$conn_w,
|
|
||||||
'DELETE FROM %T WHERE revisionID = %d',
|
|
||||||
self::TABLE_COMMIT,
|
|
||||||
$this->getID());
|
|
||||||
|
|
||||||
// we have to do paths a little differently as they do not have
|
// we have to do paths a little differently as they do not have
|
||||||
// an id or phid column for delete() to act on
|
// an id or phid column for delete() to act on
|
||||||
$dummy_path = new DifferentialAffectedPath();
|
$dummy_path = new DifferentialAffectedPath();
|
||||||
|
|
|
@ -26,9 +26,12 @@ final class DifferentialSchemaSpec extends PhabricatorConfigSchemaSpec {
|
||||||
'persistence' => PhabricatorConfigTableSchema::PERSISTENCE_CACHE,
|
'persistence' => PhabricatorConfigTableSchema::PERSISTENCE_CACHE,
|
||||||
));
|
));
|
||||||
|
|
||||||
|
// TODO: All readers and writers for this table were removed in April
|
||||||
|
// 2019. Destroy this table once we're sure we won't miss it.
|
||||||
|
|
||||||
$this->buildRawSchema(
|
$this->buildRawSchema(
|
||||||
id(new DifferentialRevision())->getApplicationName(),
|
id(new DifferentialRevision())->getApplicationName(),
|
||||||
DifferentialRevision::TABLE_COMMIT,
|
'differential_commit',
|
||||||
array(
|
array(
|
||||||
'revisionID' => 'id',
|
'revisionID' => 'id',
|
||||||
'commitPHID' => 'phid',
|
'commitPHID' => 'phid',
|
||||||
|
|
|
@ -231,13 +231,6 @@ abstract class PhabricatorRepositoryCommitMessageParserWorker
|
||||||
->addEdge($commit->getPHID(), $commit_drev, $revision->getPHID())
|
->addEdge($commit->getPHID(), $commit_drev, $revision->getPHID())
|
||||||
->save();
|
->save();
|
||||||
|
|
||||||
queryfx(
|
|
||||||
$conn_w,
|
|
||||||
'INSERT IGNORE INTO %T (revisionID, commitPHID) VALUES (%d, %s)',
|
|
||||||
DifferentialRevision::TABLE_COMMIT,
|
|
||||||
$revision->getID(),
|
|
||||||
$commit->getPHID());
|
|
||||||
|
|
||||||
$should_close = !$revision->isPublished() && $should_autoclose;
|
$should_close = !$revision->isPublished() && $should_autoclose;
|
||||||
if ($should_close) {
|
if ($should_close) {
|
||||||
$type_close = DifferentialRevisionCloseTransaction::TRANSACTIONTYPE;
|
$type_close = DifferentialRevisionCloseTransaction::TRANSACTIONTYPE;
|
||||||
|
|
Loading…
Add table
Reference in a new issue