SQL error during Ferret migration of Ponder


#1

Observed Behavior:
When upgrading to Phabricator Week 7, Year 2019 and “phabricator/resources/sql/autopatches/20171026.ferret.05.ponder.index.php” migration is executed I’m getting SQL error, when I have records in “ponder_question” table and migration is unable to continue:

[2019-03-02 13:21:39] EXCEPTION: (AphrontSchemaQueryException) #1054: Unknown column 'dateCreated' in 'field list' at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:328]
arcanist(head=master, ref.master=e5fa2fd73ac7), phabricator(head=metrics-application, ref.master=2261280b1811, ref.metrics-application=bd1156b99214), phutil(head=master, ref.master=2d3c8748de68)
  #0 AphrontBaseMySQLDatabaseConnection::throwCommonException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:351]
  #1 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:292]
  #2 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:188]
  #3 AphrontBaseMySQLDatabaseConnection::executeQuery(PhutilQueryString) called at [<phutil>/src/xsprintf/queryfx.php:8]
  #4 queryfx(AphrontMySQLiDatabaseConnection, string, PhutilQueryString, PhabricatorWorkerActiveTask, array, array)
  #5 call_user_func_array(string, array) called at [<phutil>/src/aphront/storage/connection/AphrontDatabaseConnection.php:58]
  #6 AphrontDatabaseConnection::query(string, PhutilQueryString, PhabricatorWorkerActiveTask, array, array) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:1107]
  #7 LiskDAO::insertRecordIntoDatabase(string) called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:939]
  #8 LiskDAO::insert() called at [<phabricator>/src/infrastructure/storage/lisk/LiskDAO.php:908]
  #9 LiskDAO::save() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:70]
  #10 PhabricatorWorkerActiveTask::forceSaveWithoutLease() called at [<phabricator>/src/infrastructure/daemon/workers/storage/PhabricatorWorkerActiveTask.php:53]
  #11 PhabricatorWorkerActiveTask::save() called at [<phabricator>/src/infrastructure/daemon/workers/PhabricatorWorker.php:187]
  #12 PhabricatorWorker::scheduleTask(string, array, array) called at [<phabricator>/src/applications/search/worker/PhabricatorSearchWorker.php:24]
  #13 PhabricatorSearchWorker::queueDocumentForIndexing(string, array) called at [<phabricator>/resources/sql/autopatches/20171026.ferret.05.ponder.index.php:10]
  #14 require_once(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:287]
  #15 PhabricatorStorageManagementAPI::applyPatchPHP(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:241]
  #16 PhabricatorStorageManagementAPI::applyPatch(PhabricatorStoragePatch) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:1157]
  #17 PhabricatorStorageManagementWorkflow::doUpgradeSchemata(array, NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:903]
  #18 PhabricatorStorageManagementWorkflow::upgradeSchemata(array, NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:78]
  #19 PhabricatorStorageManagementUpgradeWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:107]
  #20 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:457]
  #21 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:349]
  #22 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:249]

Expected Behavior:
No error happens.

Phabricator Version:
Phabricator Week 7, Year 2019.

Reproduction Steps:

  1. mark “phabricator/resources/sql/autopatches/20171026.ferret.05.ponder.index.php” migration as non-executed
  2. add ponder question
  3. execute “bin/storage upgrade”

#2

Thanks, see https://secure.phabricator.com/D20243.


closed #3