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.
When determining which type of SQL that is to be generated, the db_driver() is used. What you really want/need is the type of the database not the driver.
DatabaseConnection::driver()
DatabaseConnection::databaseType()
db_driver() returns Database::getConnection()->driver();
Database::getConnection()->databaseType(); should be used instead. There's no shorthand function for this however.
Patch coming up ...
Comment | File | Size | Author |
---|---|---|---|
#1 | 1905096-1-database-type.patch | 4.61 KB | gielfeldt |
Comments
Comment #1
gielfeldt CreditAttribution: gielfeldt commentedComment #2
gielfeldt CreditAttribution: gielfeldt commentedComment #3
gielfeldt CreditAttribution: gielfeldt commentedAnyone?
Comment #4
gumanist CreditAttribution: gumanist commentedWorking fine for me and patch by itself sounds reasonable
Comment #5
cmoad CreditAttribution: cmoad commentedI encountered this issue and this is a real problem that needs addressed. Please accept.
Comment #6
cafuego CreditAttribution: cafuego commentedApplied to 7.x-2.x.
Comment #6.0
cafuego CreditAttribution: cafuego commentedFixed links