Перенос базы данных Phabrictor в новую установку - PullRequest
0 голосов
/ 02 мая 2019

У меня новая установка Phabricator и я пытаюсь переместить данные из старого экземпляра.После выполнения инструкций, а именно:

./bin/storage dump | gzip > backup.sql.gz # old machine
gunzip -c backup.sql.gz | mysql -u root -p # new machine

Phabricator на новой машине сломался, показывая Unhandled Exception при доступе через веб-интерфейс:

AphrontSchemaQueryException
#1054: Unknown column 's.phid' in 'field list'

Как мне продолжить?

Спасибо.

PS: Старый Phabricator rev:

commit bd0bbc713a36ab132ed2e15525ccfb3eb08b4614
Author: Chad Little <chad@phacility.com>
Date:   Mon Aug 17 11:48:29 2015 -0700

Новый rev:

commit dfbc4c1cd338c8304b8fa2c5d074564c967fd3c2
Author: epriestley <git@epriestley.com>
Date:   Thu Apr 25 10:35:35 2019 -0700

Обновление: Я действительно бежал ./bin/storage upgrade -f без везения:

$ ./bin/storage upgrade -f
Applying patch "phabricator:20150910.owners.custom.1.sql" to host "localhost"...
[2019-05-02 11:46:15] EXCEPTION: (AphrontQueryException) #1050: Table 'owners_customfieldstorage' already exists at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:376] arcanist(head=master, ref.master=9830c9316d38), phabricator(head=master, ref.master=5dc4e76eb9f8), phutil(head=master, ref.master=639e4b9cae28)
#0 AphrontBaseMySQLDatabaseConnection::throwQueryCodeException(integer, string) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:310]
#1 AphrontBaseMySQLDatabaseConnection::throwQueryException(mysqli) called at [<phutil>/src/aphront/storage/connection/mysql/AphrontBaseMySQLDatabaseConnection.php:206]
#2 AphrontBaseMySQLDatabaseConnection::executeQuery(PhutilQueryString) called at [<phutil>/src/xsprintf/queryfx.php:8]
#3 queryfx(AphrontMySQLiDatabaseConnection, string, string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:270]
#4 PhabricatorStorageManagementAPI::applyPatchSQL(string) called at [<phabricator>/src/infrastructure/storage/management/PhabricatorStorageManagementAPI.php:238]
#5 PhabricatorStorageManagementAPI::applyPatch(PhabricatorStoragePatch) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:1157]
#6 PhabricatorStorageManagementWorkflow::doUpgradeSchemata(array, NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:903]
#7 PhabricatorStorageManagementWorkflow::upgradeSchemata(array, NULL, boolean, boolean) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementUpgradeWorkflow.php:78]
#8 PhabricatorStorageManagementUpgradeWorkflow::didExecute(PhutilArgumentParser) called at [<phabricator>/src/infrastructure/storage/management/workflow/PhabricatorStorageManagementWorkflow.php:107]
#9 PhabricatorStorageManagementWorkflow::execute(PhutilArgumentParser) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:457]
#10 PhutilArgumentParser::parseWorkflowsFull(array) called at [<phutil>/src/parser/argument/PhutilArgumentParser.php:349]
#11 PhutilArgumentParser::parseWorkflows(array) called at [<phabricator>/scripts/sql/manage_storage.php:249]

Миграция на новую машину (новую ОС / apache / php) со старым фабрикатором - сработало.Это мой обходной путь по умолчанию.

...