Early Bird Registration for DrupalCon Portland 2024 is open! Register by 23:59 PST on 31 March 2024, to get $100 off your ticket.
metatags_quick module
Update #7004
Failed: PDOException: SQLSTATE[42601]: Syntax error: 7 ERROR: syntax error at or near "PRIMARY" LINE 1: ALTER TABLE metatags_quick_path_based DROP PRIMARY KEY, ADD ... ^: ALTER TABLE {metatags_quick_path_based} DROP PRIMARY KEY, ADD PRIMARY KEY (`id`); Array ( ) in metatags_quick_update_7004() (line 121 of /var/www/d7/sites/all/modules/metatags_quick/metatags_quick.install).
NOTE that I'm using PostgreSQL 9.0, which it seems is for mysql database script, and not for pgsql
Comment | File | Size | Author |
---|---|---|---|
#4 | 1732436.patch | 866 bytes | valthebald |
Comments
Comment #1
valthebaldCurrently I don't have postgresql installation by hand, so if anyone can point out correct syntax for it, that would be great
Comment #2
funex CreditAttribution: funex commentedI'm having the same problem using Postgres 8.4
Comment #3
katrin_g CreditAttribution: katrin_g commentedI solved this issue by changing the code in metatags_quick.install in Line 121. The syntax is not working with Postgres like it should, because PRIMARY KEY can't be dropped like this. PRIMARY KEY (`id`) has to be replaced by PRIMARY KEY (id).
Comment #4
valthebaldSomething like attached patch?
Comment #5
ncouraud CreditAttribution: ncouraud commentedThat patch only solves the Syntax issue for those using postgres. MSSQL users will have the same issue as well, here's the syntax for that:
Comment #6
valthebaldMaybe the right solution will be perform problematic patch only for mysql users?
Comment #7
valthebaldFixed by checking database driver type (and performing operation only for mysql)