Page MenuHomePhabricator

isRoom column doesn't exist in table when running storage upgrade.
Closed, ResolvedPublic

Description

I updated my phabricator instance to master(rPd082c33a5dbe), when I did the storage upgrade I got this error:

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

Storage is up to date. Use 'storage status' for details.
Verifying database schemata...


Database                Table              Name     Issues
phabricator_conpherence conpherence_thread key_room Missing Key

Found 1 issues(s) with schemata, detailed above.

You can review issues in more detail from the web interface, in Config > Database Status. To better understand the adjustment workflow, see "Managing Storage Adjustments" in the documentation.

MySQL needs to copy table data to make some adjustments, so these migrations may take some time.


    Fix these schema issues? [y/N] y

Fixing schema issues...
Done.

Target                                              Error
phabricator_conpherence.conpherence_thread.key_room #1072: Key column 'isRoom' doesn't exist in table

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

Target                                                      Error
phabricator_calendar.calendar_event.icon                    Surplus
phabricator_calendar.calendar_event.isRecurring             Surplus
phabricator_calendar.calendar_event.recurrenceFrequency     Surplus
phabricator_calendar.calendar_event.recurrenceEndDate       Surplus
phabricator_calendar.calendar_event.instanceOfEventPHID     Surplus
phabricator_calendar.calendar_event.sequenceIndex           Surplus
phabricator_calendar.calendar_event.spacePHID               Surplus
phabricator_conpherence.conpherence_thread.isRoom           Missing
phabricator_differential.differential_hiddencomment         Surplus
phabricator_diviner.diviner_livebook.repositoryPHID         Surplus
phabricator_diviner.diviner_livebook.editPolicy             Surplus
phabricator_diviner.diviner_livebooktransaction             Surplus
phabricator_diviner.diviner_livesymbol.repositoryPHID       Surplus
phabricator_diviner.edge                                    Surplus
phabricator_diviner.edgedata                                Surplus
phabricator_harbormaster.harbormaster_build.planAutoKey     Surplus
phabricator_harbormaster.harbormaster_buildlintmessage      Surplus
phabricator_harbormaster.harbormaster_buildplan.planAutoKey Surplus
phabricator_harbormaster.harbormaster_buildstep.stepAutoKey Surplus
phabricator_harbormaster.harbormaster_buildunitmessage      Surplus
phabricator_maniphest.maniphest_task.spacePHID              Surplus
phabricator_metamta.metamta_applicationemail.spacePHID      Surplus
phabricator_metamta.metamta_applicationemailtransaction     Surplus
phabricator_metamta.metamta_mail.phid                       Surplus
phabricator_metamta.metamta_mail.actorPHID                  Surplus
phabricator_owners.owners_package.mailKey                   Surplus
phabricator_owners.owners_packagetransaction                Surplus
phabricator_passphrase.passphrase_credential.authorPHID     Surplus
phabricator_passphrase.passphrase_credential.spacePHID      Surplus
phabricator_pastebin.pastebin_paste.spacePHID               Surplus
phabricator_pholio.pholio_mock.spacePHID                    Surplus
phabricator_releeph.releeph_project.arcanistProjectID       Wrong Nullable Setting
phabricator_repository.repository.spacePHID                 Surplus
phabricator_user.user.isMailingList                         Surplus
phabricator_worker.edge                                     Surplus
phabricator_worker.edgedata                                 Surplus
phabricator_worker.worker_bulkjob                           Surplus
phabricator_worker.worker_bulkjobtransaction                Surplus
phabricator_worker.worker_bulktask                          Surplus

 SCHEMATA ERRORS

The schemata have errors (detailed above) which the adjustment workflow can
not fix.

Some of these errors are caused by surplus schemata (extra tables or columsn
which Phabricator does not expect). These are not serious. For information on
resolving these issues, see the "Surplus Schemata" section in the "Managing
Storage Adjustments" article in the documentation.

If you are not developing Phabricator itself, report this issue to the
upstream.

If you are developing Phabricator, these errors usually indicate that your
schema specifications do not agree with the schemata your code actually
builds.

Event Timeline

rupertsteel raised the priority of this task from to Needs Triage.
rupertsteel updated the task description. (Show Details)
rupertsteel added a subscriber: rupertsteel.

bin/storage status should tell you if you have patches that didn't get applied.

Specifically isRoom was added in 20150317.conpherence.isroom.1.sql

Do you know when you last updated roughly? Did you install Phabricator from source?

Phabricator was installed from source using git. I can't quite remember when I last updated it, but it was probably around the end of may.

Running bin/storage status gives

phabricator:20150317.conpherence.isroom.1.sql             Applied sql  /opt/phabricator/phabricator/resources/sql/autopatches/20150317.conpherence.isroom.1.sql

I don't have any other ideas. It was added in that patch, then removed a few months later in rP541e3d9e. key_room doesn't exist at HEAD.

Yeah, even the surplus stuff is off. I'd verify your entire update process. For example, my phabricator_calendar.calendar_event table looks like this:

MariaDB [phabricator_calendar]> show columns in calendar_event;
+---------------------+------------------+------+-----+---------+----------------+
| Field               | Type             | Null | Key | Default | Extra          |
+---------------------+------------------+------+-----+---------+----------------+
| id                  | int(10) unsigned | NO   | PRI | NULL    | auto_increment |
| phid                | varbinary(64)    | NO   | UNI | NULL    |                |
| userPHID            | varbinary(64)    | NO   | MUL | NULL    |                |
| dateFrom            | int(10) unsigned | NO   |     | NULL    |                |
| dateTo              | int(10) unsigned | NO   |     | NULL    |                |
| dateCreated         | int(10) unsigned | NO   |     | NULL    |                |
| dateModified        | int(10) unsigned | NO   |     | NULL    |                |
| description         | longtext         | NO   |     | NULL    |                |
| name                | longtext         | NO   |     | NULL    |                |
| isCancelled         | tinyint(1)       | NO   |     | NULL    |                |
| viewPolicy          | varbinary(64)    | NO   |     | NULL    |                |
| editPolicy          | varbinary(64)    | NO   |     | NULL    |                |
| mailKey             | binary(20)       | NO   |     | NULL    |                |
| isAllDay            | tinyint(1)       | NO   |     | NULL    |                |
| icon                | varchar(32)      | NO   |     | NULL    |                |
| isRecurring         | tinyint(1)       | NO   |     | NULL    |                |
| recurrenceFrequency | longtext         | NO   |     | NULL    |                |
| recurrenceEndDate   | int(10) unsigned | YES  |     | NULL    |                |
| instanceOfEventPHID | varbinary(64)    | YES  | MUL | NULL    |                |
| sequenceIndex       | int(10) unsigned | YES  |     | NULL    |                |
| spacePHID           | varbinary(64)    | YES  | MUL | NULL    |                |
+---------------------+------------------+------+-----+---------+----------------+
21 rows in set (0.01 sec)

MariaDB [phabricator_calendar]>

Turns out that somehow the git repository got corrupted, deleting the phabricator install and getting it from git again fixed the issue.

chad claimed this task.