The patch adds prefixing for UPDATE SQL statements in prefix.sh.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

axel’s picture

Title: Prefix UPDATE statements in prefix.sh » Prefix UPDATE & DROP TABLE IF EXISTS statements in prefix.sh
FileSize
358 bytes

Sorry, previous patch broken (space was skiped). Next patch works ok. Also prefixing for DROP TABLE IF EXISTS statement added.

killes@www.drop.org’s picture

Category: bug » feature
Status: Needs review » Reviewed & tested by the community

I'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.

Bèr Kessels’s picture

I 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.

Cvbge’s picture

Status: Reviewed & tested by the community » Needs work

DROP TABLE IF EXISTS does not work with postgresql (it does not support IF EXISTS statement)

axel’s picture

Status: Needs work » Needs review

Patch 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.

webchick’s picture

Status: Needs review » Reviewed & tested by the community

Tested against privatemsg.mysql which has both of these statements and it works as advertised. Thanks!

webchick’s picture

FileSize
745 bytes

Er. 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.

webchick’s picture

FileSize
625 bytes

And here's one for 4.6 as well.

webchick’s picture

FileSize
610 bytes

Let's try that again and pretend I don't have a crappy Windows text editor. :P

Sorry, I will quit spamming now. :P

Gerhard Killesreiter’s picture

Status: Reviewed & tested by the community » Fixed

applied

Anonymous’s picture

Status: Fixed » Closed (fixed)