Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Problem/Motivation
}
else {
new \Exception("Unable to parse the column type " . $row->type);
}
in \Drupal\Core\Database\Driver\sqlite\Schema
should throw the exception.
Proposed resolution
Throw the exception and test it.
Remaining tasks
User interface changes
API changes
Data model changes
Comment | File | Size | Author |
---|---|---|---|
#3 | sqlite-throw-exception-2667574-3.patch | 894 bytes | dagmar |
Comments
Comment #3
dagmarHere is the patch. Do we have a place to put tests for sqlite?
Comment #4
dawehnerNice catch! I guess there is no real way to test that?
Comment #5
dagmarWell, there are no tests for sqlite on
core/tests/Drupal/Tests/Core/Database/Driver
... An also test this implies create a broken schema, right? So I don't know.Comment #7
dagmarComment #8
daffie CreditAttribution: daffie commentedIf there is no way to test the patch from this issue, as @dawehner is suggesting, then the patch is for me RTBC.
Comment #9
alexpottCommitted 74a80df and pushed to 8.1.x and 8.2.x. Thanks!
@dagmar it is not that there are no tests. We run ALL the database tests against all databases. However given that this exception would occur when we can't map back from an sqlite field this is going to be very hard to test given all affinities are covered... https://www.sqlite.org/datatype3.html.
Fixed this coding standard on commit.