Page MenuHomePhabricator

Unable to apply patch 'phabricator:20160112.repo.02.uri.index.php': Table 'phabricator_repository.repository_uri' doesn't exist
Closed, ResolvedPublic

Description

while performing an upgrade with the standard upgrade process, I get this error:

# phabricator/bin/storage upgrade
Before running storage upgrades, you should take down the Phabricator web
interface and stop any running Phabricator daemons (you can disable this
warning with --force).

    Are you ready to continue? [y/N] y

Applying patch 'phabricator:20151231.proj.01.icon.php'...
Applying patch 'phabricator:20160102.badges.award.sql'...
Applying patch 'phabricator:20160110.repo.01.slug.sql'...
Applying patch 'phabricator:20160110.repo.02.slug.php'...
Applying patch 'phabricator:20160111.repo.01.slugx.sql'...
Applying patch 'phabricator:20160112.repo.01.uri.sql'...
Applying patch 'phabricator:20160112.repo.02.uri.index.php'...
[2016-05-11 13:14:31] EXCEPTION: (AphrontSchemaQueryException) #1146: Table 'phabricator_repository.repository_uri' doesn't exist at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:325]
arcanist(head=master, ref.master=c58f1b9a2507), phabricator(head=master, ref.master=0b5ab2330d99), phutil(head=master, ref.master=180f0999d094)
  #0 AphrontBaseMySQLDatabaseConnection::throwCommonException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:348]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:289]
  #2 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:185]
  #3 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #4 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string, string, string, string, string, string, string)
  #5 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:11]
  #6 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, string, string, string, string, string, string, string, string) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:100]
  #7 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRows(PhabricatorRepositoryURI) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:82]
  #8 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPage(PhabricatorRepositoryURI) called at [<phabricator>/src/applications/repository/query/PhabricatorRepositoryURIQuery.php:43]
  #9 PhabricatorRepositoryURIQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:227]
  #10 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/repository/query/PhabricatorRepositoryQuery.php:363]
  #11 PhabricatorRepositoryQuery::didFilterPage(array) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:262]
  #12 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:167]
  #13 PhabricatorPolicyAwareQuery::executeOne() called at [<phabricator>/src/applications/repository/storage/PhabricatorRepository.php:1288]
  #14 PhabricatorRepository::getCloneURIObject() called at [<phabricator>/src/applications/repository/storage/PhabricatorRepository.php:807]
  #15 PhabricatorRepository::updateURIIndex() called at [<phabricator>/resources/sql/autopatches/20160112.repo.02.uri.index.php:6]
  #16 require_once(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:277]
  #17 PhabricatorStorageManagementAPI::applyPatchPHP(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:233]
  #18 PhabricatorStorageManagementAPI::applyPatch(PhabricatorStoragePatch) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:894]
  #19 PhabricatorStorageManagementWorkflow::doUpgradeSchemata(NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:765]
  #20 PhabricatorStorageManagementWorkflow::upgradeSchemata(NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:76]
  #21 PhabricatorStorageManagementUpgradeWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:64]
  #22 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:410]
  #23 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:303]
  #24 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:211]

this looks similar to T8743: Unable to apply patch 'phabricator:20150116.maniphestapplicationemails.php': Table 'phabricator_spaces.spaces_namespace' doesn't exist, but it's not clear how to move on from here. Thanx

Event Timeline

This should now be fixed in HEAD of master -- try updating again? You'll need to git pull in phabricator/ to pick up the change.

Works like a charm. I never imagined this could be so quick ! Many thanks

epriestley claimed this task.

Cool -- thanks for the report, and sorry about the issue! Some of the Diffusion/repository stuff has been a little choppy lately as we've rolled out changes in connection with T10922 / T10923. Let us know if you run into anything else.