1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 08:42:41 +01:00

Remove "Project ID" from Releeph Projects

Summary:
Fixes T3660. Releeph Projects currently have an unused one-to-one mapping to Phabricator projects. This isn't consistent with other applications and has no integrations or uses. Get rid of it.

NOTE: Waiting for signoff from @legneato on T3660 before pulling the trigger here.

Test Plan: Created and edited Releeph projects. Grepped for references to project ID; there are a dozen or so but they're all either Releeph projects or Arcanist projects.

Reviewers: btrahan

Reviewed By: btrahan

CC: LegNeato, aran

Maniphest Tasks: T3660

Differential Revision: https://secure.phabricator.com/D6635
This commit is contained in:
epriestley 2013-08-14 09:00:56 -07:00
parent 296818e129
commit a84cc777c8
4 changed files with 6 additions and 17 deletions

View file

@ -0,0 +1,2 @@
ALTER TABLE {$NAMESPACE}_releeph.releeph_project
DROP projectID;

View file

@ -13,8 +13,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
$project_name = $request->getStr('name', $project_name = $request->getStr('name',
$this->getReleephProject()->getName()); $this->getReleephProject()->getName());
$phabricator_project_id = $request->getInt('projectID',
$this->getReleephProject()->getProjectID());
$trunk_branch = $request->getStr('trunkBranch', $trunk_branch = $request->getStr('trunkBranch',
$this->getReleephProject()->getTrunkBranch()); $this->getReleephProject()->getTrunkBranch());
$branch_template = $request->getStr('branchTemplate'); $branch_template = $request->getStr('branchTemplate');
@ -81,7 +79,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
} }
$project = $this->getReleephProject() $project = $this->getReleephProject()
->setProjectID($phabricator_project_id)
->setTrunkBranch($trunk_branch) ->setTrunkBranch($trunk_branch)
->setDetail('pushers', $pusher_phids) ->setDetail('pushers', $pusher_phids)
->setDetail('pick_failure_instructions', $pick_failure_instructions) ->setDetail('pick_failure_instructions', $pick_failure_instructions)
@ -173,12 +170,6 @@ final class ReleephProjectEditController extends ReleephProjectController {
->setLabel(pht('Releeph Project PHID')) ->setLabel(pht('Releeph Project PHID'))
->setValue( ->setValue(
$this->getReleephProject()->getPHID())) $this->getReleephProject()->getPHID()))
->appendChild(
id(new AphrontFormSelectControl())
->setLabel(pht('Phabricator Project'))
->setValue($phabricator_project_id)
->setName('projectID')
->setOptions($projects))
->appendChild( ->appendChild(
id(new AphrontFormTextControl()) id(new AphrontFormTextControl())
->setLabel(pht('Trunk')) ->setLabel(pht('Trunk'))

View file

@ -22,7 +22,6 @@ final class ReleephProject extends ReleephDAO
protected $isActive; protected $isActive;
protected $createdByUserPHID; protected $createdByUserPHID;
protected $arcanistProjectID; protected $arcanistProjectID;
protected $projectID;
protected $details = array(); protected $details = array();
@ -76,13 +75,6 @@ final class ReleephProject extends ReleephDAO
} }
} }
public function loadPhabricatorProject() {
if ($id = $this->getProjectID()) {
return id(new PhabricatorProject())->load($id);
}
return id(new PhabricatorProject())->makeEphemeral(); // dummy
}
public function loadArcanistProject() { public function loadArcanistProject() {
return $this->loadOneRelative( return $this->loadOneRelative(
new PhabricatorRepositoryArcanistProject(), new PhabricatorRepositoryArcanistProject(),

View file

@ -1539,6 +1539,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList {
'type' => 'sql', 'type' => 'sql',
'name' => $this->getPatchPath('20130731.releephrepoid.sql'), 'name' => $this->getPatchPath('20130731.releephrepoid.sql'),
), ),
'20130731.releephproject.sql' => array(
'type' => 'sql',
'name' => $this->getPatchPath('20130731.releephproject.sql'),
),
); );
} }
} }