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.
This could be tested if running tests for SchemaAPI when main durpal instance user database prefix
Test: 'Node index exists' would be broken because it checks for 'node' table
Comment | File | Size | Author |
---|---|---|---|
#8 | 720620_indexExists_d7.patch | 6.12 KB | andypost |
#6 | 720620_indexExists_d7.patch | 5.92 KB | andypost |
#4 | 720620_indexExists_d7.patch | 3.51 KB | andypost |
#1 | 720620_indexExists_d7.patch | 4.76 KB | andypost |
indexExists_d7.patch | 1.49 KB | andypost | |
Comments
Comment #1
andypostCritical because this schema API
This patch with tests, mostly for pgsql, because sqlite schema tests is mostly broken
Comment #3
andypost#1: 720620_indexExists_d7.patch queued for re-testing.
Comment #4
andypostThere was hunk to rename indexes from #718016: DatabaseSchema_pgsql::renameTable() needs to rename the indexes
I replace testCheckIndex() with extended tests inside testSchema() for #718846: DatabaseSchema_pgsql should not prefix the constraints names
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedNice additional coverage. Please move all the patch from #716006: Schema tests fail on SQLite into here: properly fixing SQLite requires a little bit more work then just adding the prefixing into
DatabaseSchema::indexExists()
.Comment #6
andypostCool! with changes from #716006 schema tests works for sqlite!
Comment #7
Josh Waihi CreditAttribution: Josh Waihi commentedCan we have some documentation? I don't understand what this is for.
Comment #8
andypostAdded comment.
@Josh indexes in pgsql and sqlite are prefixed with table name, to get index name we need remove
{table_name}_
Comment #9
Josh Waihi CreditAttribution: Josh Waihi commentedOK cool, I'm happy and trust @andypost's patches with docs :)
Comment #10
mynet CreditAttribution: mynet commentedindexExists_d7.patch queued for re-testing.
Comment #11
webchickLooks good. Committed to HEAD.
Comment #12
andypostNow we need #718016: DatabaseSchema_pgsql::renameTable() needs to rename the indexes