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.
Bad news: DatabaseSchema_sqlite is severely broken. Good news: with the upgrade tests, we know have some intense Schema tests :)
Are broken:
- dropField() exits with FALSE when the field exists (oups!)
- changeField() and alterTable() doesn't map the old field name to the new field name, so the data migration query fails (re-oups!)
- changeField() doesn't change the name of a renamed field in the index / unique key definitions (re-re-oups!)
- dropField() doesn't remove the name of the dropped field, so the data migration query fails (re-re-re-oups!)
Critical because the Upgrade path test fails on SQLite (because the Schema is broken).
Comment | File | Size | Author |
---|---|---|---|
#11 | 851698-sqlite-schema-broken.patch | 13.73 KB | Damien Tournoud |
#8 | 851698-sqlite-schema-broken.patch | 12.52 KB | Damien Tournoud |
#6 | 851698-sqlite-schema-broken.patch | 9.14 KB | Damien Tournoud |
#1 | 851698-sqlite-schema-broken.patch | 8.16 KB | Damien Tournoud |
Comments
Comment #1
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #2
Damien Tournoud CreditAttribution: Damien Tournoud commentedAlso, we are creating / destroying the indexes twice during a field rename operation: once for the data migration, once for the table rename. We should avoid creating the indexes when creating the temporary table. This affects performance but doesn't affect functionality.
Comment #4
Damien Tournoud CreditAttribution: Damien Tournoud commentedThis one relies on the other DatabaseSchema_sqlite patches I posted earlier. It doesn't apply on top of a vanilla tree, but it can still be reviewed :)
MySQL is not affected anyway.
Comment #5
Damien Tournoud CreditAttribution: Damien Tournoud commentedSome additional issues:
Comment #6
Damien Tournoud CreditAttribution: Damien Tournoud commentedComment #8
Damien Tournoud CreditAttribution: Damien Tournoud commentedMerged in the patch from #851166: SQLite schema implementation doesn't support qualified tables.
Comment #9
Stevel CreditAttribution: Stevel commentedStill works on mysql according to testbot, and this patch makes the basic upgrade test work on sqlite, which is definitely a huge plus. One small thing though:
Using the brackets around {$info['schema']} is a bit confusing here: It's not clear whether they show up in the resulting string or not?
I think it would be better for clarity to use concatenation here to include the variable
51 critical left. Go review some!
Comment #10
chx CreditAttribution: chx commentedRight. So this needs work.
Comment #11
Damien Tournoud CreditAttribution: Damien Tournoud commentedFixes #9.
Comment #12
chx CreditAttribution: chx commentedGood job.
Comment #13
Dries CreditAttribution: Dries commentedCommitted to CVS HEAD. Thanks!