Page MenuHomePhabricator

D15216.id36730.diff
No OneTemporary

D15216.id36730.diff

diff --git a/resources/sql/autopatches/20160208.task.1.sql b/resources/sql/autopatches/20160208.task.1.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20160208.task.1.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
+ DROP projectPHIDs;
diff --git a/resources/sql/autopatches/20160208.task.2.sql b/resources/sql/autopatches/20160208.task.2.sql
new file mode 100644
--- /dev/null
+++ b/resources/sql/autopatches/20160208.task.2.sql
@@ -0,0 +1,2 @@
+ALTER TABLE {$NAMESPACE}_maniphest.maniphest_task
+ DROP attached;
diff --git a/resources/sql/patches/migrate-maniphest-dependencies.php b/resources/sql/patches/migrate-maniphest-dependencies.php
--- a/resources/sql/patches/migrate-maniphest-dependencies.php
+++ b/resources/sql/patches/migrate-maniphest-dependencies.php
@@ -1,29 +1,3 @@
<?php
-echo pht('Migrating task dependencies to edges...')."\n";
-$table = new ManiphestTask();
-$table->openTransaction();
-
-foreach (new LiskMigrationIterator($table) as $task) {
- $id = $task->getID();
- echo pht('Task %d: ', $id);
-
- $deps = $task->getAttachedPHIDs(ManiphestTaskPHIDType::TYPECONST);
- if (!$deps) {
- echo "-\n";
- continue;
- }
-
- $editor = new PhabricatorEdgeEditor();
- foreach ($deps as $dep) {
- $editor->addEdge(
- $task->getPHID(),
- ManiphestTaskDependsOnTaskEdgeType::EDGECONST,
- $dep);
- }
- $editor->save();
- echo pht('OKAY')."\n";
-}
-
-$table->saveTransaction();
-echo pht('Done.')."\n";
+// From 2013-2016, this migration moved dependent tasks to edges.
diff --git a/resources/sql/patches/migrate-maniphest-revisions.php b/resources/sql/patches/migrate-maniphest-revisions.php
--- a/resources/sql/patches/migrate-maniphest-revisions.php
+++ b/resources/sql/patches/migrate-maniphest-revisions.php
@@ -1,28 +1,3 @@
<?php
-echo pht('Migrating task revisions to edges...')."\n";
-$table = new ManiphestTask();
-$table->establishConnection('w');
-
-foreach (new LiskMigrationIterator($table) as $task) {
- $id = $task->getID();
- echo pht('Task %d: ', $id);
-
- $revs = $task->getAttachedPHIDs(DifferentialRevisionPHIDType::TYPECONST);
- if (!$revs) {
- echo "-\n";
- continue;
- }
-
- $editor = new PhabricatorEdgeEditor();
- foreach ($revs as $rev) {
- $editor->addEdge(
- $task->getPHID(),
- ManiphestTaskHasRevisionEdgeType::EDGECONST,
- $rev);
- }
- $editor->save();
- echo pht('OKAY')."\n";
-}
-
-echo pht('Done.')."\n";
+// From 2013-2016, this migration moved revisions attached to tasks to edges.
diff --git a/src/applications/maniphest/storage/ManiphestTask.php b/src/applications/maniphest/storage/ManiphestTask.php
--- a/src/applications/maniphest/storage/ManiphestTask.php
+++ b/src/applications/maniphest/storage/ManiphestTask.php
@@ -34,8 +34,6 @@
protected $viewPolicy = PhabricatorPolicies::POLICY_USER;
protected $editPolicy = PhabricatorPolicies::POLICY_USER;
- protected $projectPHIDs = array();
-
protected $ownerOrdering;
protected $spacePHID;
protected $properties = array();
@@ -45,9 +43,6 @@
private $customFields = self::ATTACHABLE;
private $edgeProjectPHIDs = self::ATTACHABLE;
- // TODO: This field is unused and should eventually be removed.
- protected $attached = array();
-
public static function initializeNewTask(PhabricatorUser $actor) {
$app = id(new PhabricatorApplicationQuery())
->setViewer($actor)
@@ -72,9 +67,6 @@
return array(
self::CONFIG_AUX_PHID => true,
self::CONFIG_SERIALIZATION => array(
- 'ccPHIDs' => self::SERIALIZATION_JSON,
- 'attached' => self::SERIALIZATION_JSON,
- 'projectPHIDs' => self::SERIALIZATION_JSON,
'properties' => self::SERIALIZATION_JSON,
),
self::CONFIG_COLUMN_SCHEMA => array(
@@ -88,11 +80,6 @@
'ownerOrdering' => 'text64?',
'originalEmailSource' => 'text255?',
'subpriority' => 'double',
-
- // T6203/NULLABILITY
- // This should not be nullable. It's going away soon anyway.
- 'ccPHIDs' => 'text?',
-
),
self::CONFIG_KEY_SCHEMA => array(
'key_phid' => null,
@@ -143,10 +130,6 @@
ManiphestTaskDependedOnByTaskEdgeType::EDGECONST);
}
- public function getAttachedPHIDs($type) {
- return array_keys(idx($this->attached, $type, array()));
- }
-
public function generatePHID() {
return PhabricatorPHID::generateNewPHID(ManiphestTaskPHIDType::TYPECONST);
}

File Metadata

Mime Type
text/plain
Expires
Wed, Nov 13, 4:00 PM (4 d, 10 h ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6725448
Default Alt Text
D15216.id36730.diff (4 KB)

Event Timeline