Closed (fixed)
Project:
Poll
Version:
8.x-1.x-dev
Component:
Code
Priority:
Major
Category:
Bug report
Assigned:
Reporter:
Created:
9 Apr 2016 at 02:36 UTC
Updated:
3 May 2016 at 22:54 UTC
Jump to comment: Most recent, Most recent file
Upgrading from beta1 to beta2 returns an error on update.php results:
poll module
Update #8001
Failed: Drupal\Core\Database\SchemaObjectDoesNotExistException: Cannot change the definition of field poll__choice.choice_chid: field doesn't exist. in Drupal\Core\Database\Driver\mysql\Schema->changeField() (line 525 of /home/udcadmin/public_html/udc.global/core/lib/Drupal/Core/Database/Driver/mysql/Schema.php).
Drupal 8.06
| Comment | File | Size | Author |
|---|---|---|---|
| #8 | interdiff-2703091-7-8.txt | 525 bytes | johnchque |
| #8 | update_returns_errors-2703091-8.patch | 584 bytes | johnchque |
| #7 | update_returns_errors-2703091-7.patch | 528 bytes | johnchque |
| #5 | update_returns_errors-2703091-5.patch | 516 bytes | johnchque |
Comments
Comment #2
matthias_bauw commentedI can confirm this.
Comment #3
berdirThat's because that update function was added too late. If you installed beta1 and not an earlier version, then there's nothing you need to do.
I can't change anything about beta2, I'd have to release a new beta3 to change something.
For now, you can run this: "drupal_set_installed_schema_version('poll', 8001)". With drush ev, or if you can't use drush just put it at the end of index.php, access the site once and then remove it again.
Comment #4
berdirTo work around this, we need to add a new check by calling \Drupal::entityDefinitionUpdateManager()->getEntityType('poll_choice') and if that already exists, return early.
Comment #5
johnchqueTested manually, added work around suggested on #4
Comment #6
johnchque[Duplicated]
Comment #7
johnchqueDiscussed with @Berdir, changed the check. Tested manually and it works good. :)
Comment #8
johnchqueSorry, needed to fix a space, also added a comment.
Comment #9
berdirComment #11
berdirThanks, committed.
Comment #12
shadowmihai commentedYes, does seem to work now thanks!