Page MenuHomePhabricator

Unable to apply patch 'phabricator:20150116.maniphestapplicationemails.php': Table 'phabricator_spaces.spaces_namespace' doesn't exist
Closed, ResolvedPublic

Description

This is coming from an old install of Phabricator during upgrade. I have to either complete the upgrade or revert to previous state.

Applying patch 'phabricator:20150116.maniphestapplicationemails.php'...
Migrating `metamta.maniphest.public-create-email` to new application email infrastructure...
[2015-07-03 12:25:33] EXCEPTION: (AphrontSchemaQueryException) #1146: Table 'phabricator_spaces.spaces_namespace' doesn't exist at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:308]
arcanist(head=master, ref.master=d54cb072facd), phabricator(head=master, ref.master=1f4cd900f3de), phutil(head=master, ref.master=83f09f6c5a03)
  #0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:275]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:181]
  #2 AphrontBaseMySQLDatabaseConnection::executeRawQuery(string) called at [<phutil>/src/xsprintf/queryfx.php:6]
  #3 queryfx(AphrontMySQLiDatabaseConnection, string, string, string, string, string, string, string, string, string, string)
  #4 call_user_func_array(string, array) called at [<phutil>/src/xsprintf/queryfx.php:11]
  #5 queryfx_all(AphrontMySQLiDatabaseConnection, string, string, string, string, string, string, string, string, string, string) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:99]
  #6 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPageRows(PhabricatorSpacesNamespace) called at [<phabricator>/src/infrastructure/query/policy/PhabricatorCursorPagedPolicyAwareQuery.php:81]
  #7 PhabricatorCursorPagedPolicyAwareQuery::loadStandardPage(PhabricatorSpacesNamespace) called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:40]
  #8 PhabricatorSpacesNamespaceQuery::loadPage() called at [<phabricator>/src/infrastructure/query/policy/PhabricatorPolicyAwareQuery.php:227]
  #9 PhabricatorPolicyAwareQuery::execute() called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:114]
  #10 PhabricatorSpacesNamespaceQuery::getAllSpaces() called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:150]
  #11 PhabricatorSpacesNamespaceQuery::getViewerSpaces(PhabricatorUser) called at [<phabricator>/src/applications/spaces/query/PhabricatorSpacesNamespaceQuery.php:171]
  #12 PhabricatorSpacesNamespaceQuery::getViewerActiveSpaces(PhabricatorUser) called at [<phabricator>/src/applications/people/storage/PhabricatorUser.php:797]
  #13 PhabricatorUser::getDefaultSpacePHID() called at [<phabricator>/src/applications/metamta/storage/PhabricatorMetaMTAApplicationEmail.php:48]
  #14 PhabricatorMetaMTAApplicationEmail::initializeNewAppEmail(PhabricatorUser) called at [<phabricator>/resources/sql/autopatches/20150116.maniphestapplicationemails.php:11]
  #15 require_once(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:226]
  #16 PhabricatorStorageManagementAPI::applyPatchPHP(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:191]
  #17 PhabricatorStorageManagementAPI::applyPatch(PhabricatorStoragePatch) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:190]
  #18 PhabricatorStorageManagementUpgradeWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:406]
  #19 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:301]
  #20 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:176]

What are my options to get around this?

Event Timeline

vnykmshr assigned this task to epriestley.
vnykmshr raised the priority of this task from to Needs Triage.
vnykmshr updated the task description. (Show Details)
vnykmshr added a project: Maniphest.
vnykmshr added a subscriber: vnykmshr.

I believe this should now be fixed in HEAD. Please let us know if you encounter further issues.

Storage upgrade executed with following errors;

Target                                           Error
phabricator_search.search_document.documentTitle #1406: Data too long for column 'documentTitle' at row 8232

Failed to make some schema adjustments, detailed above.
For help troubleshooting adjustments, see "Managing Storage Adjustments" in the documentation.

Target                                             Error
phabricator_differential.differential_relationship Surplus
phabricator_maniphest.maniphest_task.ccPHIDs       Surplus
phabricator_maniphest.maniphest_taskproject        Surplus
phabricator_maniphest.maniphest_tasksubscriber     Surplus
phabricator_metamta.metamta_mail.retryCount        Surplus
phabricator_metamta.metamta_mail.nextRetry         Surplus
phabricator_project.project_profile                Surplus
phabricator_repository.repository_shortcut         Surplus
phabricator_search.search_query                    Surplus
phabricator_user.user_sshkey                       Surplus
phabricator_user.user_status                       Surplus

 SURPLUS SCHEMATA 

You have surplus schemata (extra tables or columns which Phabricator does not
expect). For information on resolving these issues, see the "Surplus
Schemata" section in the "Managing Storage Adjustments" article in the
documentation.

Please let me know how should I fix this.

See "Managing Storage Adjustments" in the documentation, which discusses this under "Troubleshooting":

https://secure.phabricator.com/book/phabricator/article/storage_adjust/