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.
The patch adds prefixing for UPDATE SQL statements in prefix.sh.
Comment | File | Size | Author |
---|---|---|---|
#9 | prefix-update-4.6.patch | 610 bytes | webchick |
#8 | prefix-update-46.patch | 625 bytes | webchick |
#7 | prefix-update_1.patch | 745 bytes | webchick |
#1 | prefix-update_0.patch | 358 bytes | axel |
prefix-update.patch | 297 bytes | axel | |
Comments
Comment #1
axel CreditAttribution: axel commentedSorry, previous patch broken (space was skiped). Next patch works ok. Also prefixing for DROP TABLE IF EXISTS statement added.
Comment #2
killes@www.drop.org CreditAttribution: killes@www.drop.org commentedI've tested the patch and can say it works. Don't know if we need this feature, as neither statement is used by Drupal core.
Comment #3
Bèr Kessels CreditAttribution: Bèr Kessels commentedI would say: go for it. It works, and I already once had to hand-edit all my custom modules because this thing was not in the prefix.sh
This works as expected, and makes prefixing contributed sql files easier.
Comment #4
Cvbge CreditAttribution: Cvbge commentedDROP TABLE IF EXISTS does not work with postgresql (it does not support IF EXISTS statement)
Comment #5
axel CreditAttribution: axel commentedPatch don't touch DROP TABLE IF EXISTS, it's already presents in the script. Anyway prefix.sh don't change any statements in SQL, just prefix tables. If IF EXISTS presented in SQL for Postgres then it is SQL-script problem, not prefix.sh.
Comment #6
webchickTested against privatemsg.mysql which has both of these statements and it works as advertised. Thanks!
Comment #7
webchickEr. I suppose I should've actually tested the patch rather than just copy/paste the lines I needed, eh? ;)
Here is a re-rolled version that applies against HEAD.
Comment #8
webchickAnd here's one for 4.6 as well.
Comment #9
webchickLet's try that again and pretend I don't have a crappy Windows text editor. :P
Sorry, I will quit spamming now. :P
Comment #10
Gerhard Killesreiter CreditAttribution: Gerhard Killesreiter commentedapplied
Comment #11
(not verified) CreditAttribution: commented