From bcb9de4ea1a3e9446866302934d59b999ef69318 Mon Sep 17 00:00:00 2001 From: Alan Huang Date: Mon, 6 Aug 2012 12:20:45 -0700 Subject: [PATCH] Add a context field to symbol objects Summary: See T1602. This is just the minimal functional patch; the scripts will continue working because of the `DEFAULT ''`. Test Plan: Can't fully test this until I get more code working, but nothing broke horribly yet. Reviewers: epriestley Reviewed By: epriestley CC: nh, aran, Korvin Maniphest Tasks: T1602 Differential Revision: https://secure.phabricator.com/D3147 --- resources/sql/patches/symbolcontexts.sql | 3 +++ .../repository/storage/PhabricatorRepositorySymbol.php | 1 + .../storage/patch/PhabricatorBuiltinPatchList.php | 4 ++++ 3 files changed, 8 insertions(+) create mode 100644 resources/sql/patches/symbolcontexts.sql diff --git a/resources/sql/patches/symbolcontexts.sql b/resources/sql/patches/symbolcontexts.sql new file mode 100644 index 0000000000..e63839efed --- /dev/null +++ b/resources/sql/patches/symbolcontexts.sql @@ -0,0 +1,3 @@ +ALTER TABLE {$NAMESPACE}_repository.repository_symbol + ADD symbolContext varchar(128) COLLATE utf8_general_ci NOT NULL DEFAULT '' + AFTER arcanistProjectID; diff --git a/src/applications/repository/storage/PhabricatorRepositorySymbol.php b/src/applications/repository/storage/PhabricatorRepositorySymbol.php index 12c4726389..5525da62a0 100644 --- a/src/applications/repository/storage/PhabricatorRepositorySymbol.php +++ b/src/applications/repository/storage/PhabricatorRepositorySymbol.php @@ -27,6 +27,7 @@ final class PhabricatorRepositorySymbol extends PhabricatorRepositoryDAO { protected $arcanistProjectID; + protected $symbolContext; protected $symbolName; protected $symbolType; protected $symbolLanguage; diff --git a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php index 999e742df9..90cc6fdf26 100644 --- a/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php +++ b/src/infrastructure/storage/patch/PhabricatorBuiltinPatchList.php @@ -936,6 +936,10 @@ final class PhabricatorBuiltinPatchList extends PhabricatorSQLPatchList { 'type' => 'sql', 'name' => $this->getPatchPath('daemonstatus.sql'), ), + 'symbolcontexts.sql' => array( + 'type' => 'sql', + 'name' => $this->getPatchPath('symbolcontexts.sql'), + ), ); }