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.
With this patch, the last remnants of the old database layer have been swept away. Transactions will keep modules in line. Transactions and prepared statements. (End Star Wars quote)
Comment | File | Size | Author |
---|---|---|---|
#18 | 564394-followup-kill-db-column.patch | 4.65 KB | Damien Tournoud |
#15 | good_bye5.patch | 74.58 KB | Berdir |
#14 | good_bye4.patch | 74.56 KB | Berdir |
#12 | good_bye3.patch | 72.05 KB | Berdir |
#9 | good_bye2.patch | 70.83 KB | Berdir |
Comments
Comment #2
Crell CreditAttribution: Crell commentedHead was broken for a while. Retesting.
Comment #4
bcn CreditAttribution: bcn commentedI don't think this was tested yet.
Comment #6
BerdirOh, nice patch crossposting :(, haven't seen this one
Your patch seems to be missing a few INSERT-query conversions in system_install() and the strange comment_update_1 function.
I think both patches have the same install problem, the error message is "SQLSTATE[42S01]: Base table or view already exists: 1050 Table 'd7_variable' already exists ". Don't have time to work on it today....
Comment #7
sunTagging.
Comment #8
webchickSubscribing! Yum.
Comment #9
BerdirHere is a new patch...
Fixed some stuff and changed db_query_range() after a discussion in #drupal. Basically, I made $args optional and moved it behind $from and $count. Either that or adding a array() to all db_query_range() calls without params. Patch is now quit a bit bigger now..
I was able to install locally, so, lets see what happens now...
Comment #10
BerdirDid not want to remove the tag...
Comment #12
BerdirForgot one call to queryRange, let's try again...
Comment #13
BerdirComment #14
BerdirSome clean-ups...
- All $args are now type hinted and default to an empty array() ("array $args = array()") in both the wrapper and the actual functions.
- Explanation about comment_update_1(): That function is around since D5, contained an non-converted query so I assumed it is ok to just remove it instead of converting and maybe even conflicting with other patches that would remove it in the meantime
- $from and $count are now required params for db_query_range() like queryRange() already was. Previously, they had a default value 0 (probably to help with the func_get_args() magic) but you can't LIMIT 0,0 anyway.
Comment #15
BerdirAnother cleanup, $options is now type hinted in the db_query* wrapper functions too.
Comment #16
Crell CreditAttribution: Crell commentedSo long, Farewell, Auf Wiedersehen, Good Bye!
Berdir, thank you so much for all of your hard work getting core fully converted!
Comment #17
webchickAwesome work folks!!
Perhaps my favourite patch of Drupal 7. :) Committed to HEAD!!
I assume this is covered enough by our DBTNG docs, so marking fixed.
Comment #18
Damien Tournoud CreditAttribution: Damien Tournoud commenteddb_add_column() and db_change_column() needs to go away too. Those are very old functions that are useless at least since Drupal 6.
Comment #19
sunExactly, not used at all.
Comment #20
webchickWoohoo! Committed to HEAD.