Closed (fixed)
Project:
Panels
Version:
5.x-2.x-dev
Component:
Attn -- m
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
15 Jun 2008 at 12:06 UTC
Updated:
31 Jul 2008 at 04:47 UTC
When running update.php on panels from an older schema version, I got this:
user warning: Table 'panels_mini' doesn't exist query: ALTER TABLE panels_mini DROP INDEX name_2 in /.../includes/database.mysql.inc on line 172.
I never installed panels_mini on my site. Attached patch moves this part of the update into a separate panels_mini_update_5002(). Either we should do that, or at least wrap the part of 5215 that's trying to touch {panels_mini} in a check for db_table_exists().
| Comment | File | Size | Author |
|---|---|---|---|
| panels_update_5215_mini.patch | 1.66 KB | dww |
Comments
Comment #1
sdboyer commentedBleh...boy do I hate going back and editing old schema version updates. Feels kinda like staring into the abyss.
But you're clearly right. However, in the interest of avoiding yet another round of "ZOMG WHY ARE PANELZ BROK?$!?" because of the failed query when running update.php, I'm inclined to go the alternate route you suggest and just wrap it in a db_table_exists().
Thoughts on this, Earl?
Comment #2
merlinofchaos commentedWe should probably do what this patch does, but also include a check to see if the index exists before attempting to drop it, that way we don't generate an error. Unless there is absolutely no chance that someone could end up in the state where they still have the extra index.
Comment #3
merlinofchaos commentedI realize I don't know how to check for an indexes existence.
Comment #4
sdboyer commentedIt can't be done, at least on mysql. http://forums.mysql.com/read.php?21,69904,70011#msg-70011
I guess that means I'm writing some icky updates and notices to people that there are NO problems if they see an error.
Comment #5
sdboyer commentedOK, I've added the changes, and also added a big, clear notice that people updating panels_mini and receiving an error do NOT, in fact, have a problem.
Committed. Thanks, dww.
Comment #6
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.