At the bottom of project_release_update_5200(), there is this:
// Finally, drop the stale table and column.
// While testing the upgrade path, these are both commented out for now:
//$ret[] = update_sql('DROP TABLE {project_release_default_versions}');
//$ret[] = update_sql("ALTER TABLE {project_release_projects} DROP snapshot_table");
I'm guessing that these lines need to be uncommented, and now we need another update function that checks to see if the table exists and drops it, since sites that have already upgraded to project 5.x-1.2 won't get the benefit of having these tables dropped if we just uncomment these lines and commit.
Comments
Comment #1
aclight commentedHere's a patch. UNTESTED.
Comment #2
aclight commentedHere's an updated patch which puts both of the queries in a conditional. I figured this was best just in case an astute project_release module user happened to see the queries to drop the table and column commented out in update 5200 and manually removed the table and column.
Tested pretty thoroughly using MySQL, but the pgSQL case could use testing and reveiw.
Comment #3
aclight commentedJust as a note, before this fix and update are applied, (especially to d.o), we need #235037: Critical errors in project_page_overview() query and logic to get fixed, because otherwise the project overview pages will throw database errors.
Comment #4
agentrickarddb_drop_table() is a D6-only function. This should work. Patch is written from project module root. Is that the preferred method?
Comment #5
aclight commentedGood catch. Yeah, we typically roll project* patches from the root directory of the main module, even if the patch is to a module that has its own subdirectory.
Comment #6
agentrickardTHis is probably RTBC, though I do not have pgsql running. The syntax is copied from system.install.
Comment #7
aclight commentedWas there a reason you left this part out of the patch?
Comment #8
agentrickardI can only assume that the version I'm using is incorrect.
Are we patching against DRUPAL-5 or HEAD?
Comment #9
aclight commentedHEAD, though in this case I would assume they are the same as HEAD is for D5 still and not D6.
Comment #10
agentrickardFixed. (I simply forgot to remove that part.)
Comment #11
aclight commentedthe mysql part looks good to me. i don't have a pgsql installation to test with, however.
Comment #12
hunmonk commented$ret = array();at the top -- prevents errors in the case where no queries are runComment #13
hunmonk commentedtested mysql as well, works beautifully. committed to 5.x and HEAD. thanks!
Comment #14
Anonymous (not verified) commentedAutomatically closed -- issue fixed for two weeks with no activity.