This issue is part of #2454513: [meta] Make Drupal 8 work with SQLite.

Drupal\system\Tests\Entity\EntityDefinitionUpdateTest is failing because Drupal\Core\Database\Driver\sqlite\Schema::dropField() does not handle possible changes to the primary key in the schema.

CommentFileSizeAuthor
#3 interdiff.txt668 bytesamateescu
#3 2463263-3.patch1.46 KBamateescu
#1 2463263.patch828 bytesamateescu
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

amateescu’s picture

Status: Active » Needs review
FileSize
828 bytes

Let's fix it :)

Test run after:

Test summary
------------

Drupal\system\Tests\Entity\EntityDefinitionUpdateTest        433 passes                                      

Test run duration: 23 sec
dawehner’s picture

The fix looks alright, but does that mean we should add some test coverage in \Drupal\system\Tests\Database\SchemaTest for that case?

amateescu’s picture

FileSize
1.46 KB
668 bytes

Yup, good idea :)

Running SchemaTest with just the interdiff applied:

Test summary
------------

Drupal\system\Tests\Database\SchemaTest                      121 passes             1 exceptions             

Test run duration: 2 sec

And with the patch from #1:

Test summary
------------

Drupal\system\Tests\Database\SchemaTest                      743 passes                                      

Test run duration: 2 sec
dawehner’s picture

Status: Needs review » Reviewed & tested by the community

@amateescu explained me the problem in person. It totally makes sense.

alexpott’s picture

Status: Reviewed & tested by the community » Fixed

This passes on postgres too. This issue is a normal bug fix, and doesn't include any disruptive changes, so it is allowed per https://www.drupal.org/core/beta-changes. Committed 6cd48a6 and pushed to 8.0.x. Thanks!

  • alexpott committed 6cd48a6 on 8.0.x
    Issue #2463263 by amateescu: SQLite: Fix system\Tests\Entity\...

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.