Page MenuHomePhabricator

Setting up phabricator for the first results in schema errors
Closed, ResolvedPublic

Description

Hi, when testing out phab on stretch phab-stretch.wmflabs.org/ i get this error when creating tasks

"#1054: Unknown column 'closedEpoch' in 'field list'

NOTE: This usually indicates that the MySQL schema has not been properly upgraded. Run 'bin/storage upgrade' to ensure your schema is up to date."

Which when i do bin/storage upgrade i get

1root@phabricator-stretch:/srv/phab/phabricator# bin/storage upgrade
2Before running storage upgrades, you should take down the Phabricator web
3interface and stop any running Phabricator daemons (you can disable this
4warning with --force).
5
6 Are you ready to continue? [y/N] y
7
8Storage is up to date. Use "storage status" for details.
9Synchronizing static tables...
10Verifying database schemata on "localhost"...
11
12
13Database Table Name Issues
14phabricator_maniphest maniphest_task key_closed Missing Key
15phabricator_maniphest maniphest_task key_closer Missing Key
16
17Found 2 adjustment(s) to apply, detailed above.
18
19You can review adjustments in more detail from the web interface, in Config > Database Status. To better understand the adjustment workflow, see "Managing Storage Adjustments" in the documentation.
20
21MySQL needs to copy table data to make some adjustments, so these migrations may take some time.
22
23
24 Apply these schema adjustments? [y/N] y
25
26Applying schema adjustments...
27Done.
28
29Target Error
30phabricator_maniphest.maniphest_task.key_closed #1072: Key column 'closedEpoch' doesn't exist in table
31phabricator_maniphest.maniphest_task.key_closer #1072: Key column 'closerPHID' doesn't exist in table
32
33Failed to make some schema adjustments, detailed above.
34For help troubleshooting adjustments, see "Managing Storage Adjustments" in the documentation.
35
36Target Error
37phabricator_maniphest.maniphest_task.closedEpoch Missing
38phabricator_maniphest.maniphest_task.closerPHID Missing
39
40 SCHEMATA ERRORS
41
42The schemata have errors (detailed above) which the adjustment workflow can
43not fix.
44
45If you are not developing Phabricator itself, report this issue to the
46upstream.
47
48If you are developing Phabricator, these errors usually indicate that your
49schema specifications do not agree with the schemata your code actually
50builds.
51 ANALYZE Analyzing tables...
52Done.
53 ANALYZED Analyzed 501 table(s).

Revisions and Commits

Event Timeline

How did you "test out" (or "set up" according to the task summary?) on phab-stretch.wmflabs.org ? What are steps to reproduce? Where does the upstream Phabricator code to be installed come from, and how is it pulled? (Basically: How is this related to anything in our Phab codebase itself?)

Ah found it, it was removed here https://github.com/wikimedia/phabricator/commit/f177f92217c21c12118347ac83d41d1f28a29080

the steps to reproduce was just run bin/storage upgrade using wmf phabricator source. But i found the commit.

Paladox added a revision: Restricted Differential Revision.Mar 13 2018, 3:55 PM
Paladox added a revision: Restricted Differential Revision.

Temporary workaround:

Run sudo /srv/phab/phabricator/bin/storage shell and paste the following sql statements:

ALTER TABLE phabricator_maniphest.maniphest_task
  ADD closedEpoch INT UNSIGNED;

ALTER TABLE phabnricator_maniphest.maniphest_task
  ADD closerPHID VARBINARY(64);