apparently i've been neglecting the main install table functions, as tonight aclight pointed out some errors. attached should correct. untested.

CommentFileSizeAuthor
#1 pi_tables_fix.patch3.89 KBhunmonk
pi_tables_fix.patch3.22 KBhunmonk

Comments

hunmonk’s picture

StatusFileSize
new3.89 KB

couple of fixes, correct name for project_issues table, indentation fix, fixed up some more postgres goofs.

upgrade tested in postgres, works perfectly.

aclight’s picture

Status: Needs review » Reviewed & tested by the community

code looks good and it works right on mysql, both when upgrading an already existing installation and when running a new installation.

aclight’s picture

Status: Reviewed & tested by the community » Fixed

Fixed in http://drupal.org/cvs?commit=104700 and deployed on drupal.org and project.drupal.org

dww’s picture

Priority: Normal » Critical
Status: Fixed » Needs work

I'm totally confused by project_issue_update_5207() from this patch. project_issue_update_5204() already does the following:

  $ret = array();
  // Postgres and MySQL have the same syntax for this, so no switch statement.
  $ret[] = update_sql('ALTER TABLE {project_issues} DROP COLUMN file_path');
  $ret[] = update_sql('ALTER TABLE {project_issues} DROP COLUMN file_mime');
  $ret[] = update_sql('ALTER TABLE {project_issues} DROP COLUMN file_size');

so, most of 5207() is dead code.

however, more frighteningly, it's dropping a column we *just* added in 5200() for the original IFAC conversion: 'original_issue_data', which is still present in project_issue_install(). Seems like everything in 5207() should be ripped out. what's going on here? calling this critical due to dropping original_issue_data. :(

thanks,
-derek

dww’s picture

Priority: Critical » Minor

sorry, my bad, i missed the tables involved here. the 'original_issue_data' column we care about is {project_issues}, where it still lives. the one being removed in 5207() is the column in {project_issue_comments}, so i guess that's ok. downgrading this back to minor. however, i still don't understand why there's all this cruft for dropping the columns from {project_issues}, and therefore, all of 5207() could be simplified drastically.

aclight’s picture

Priority: Minor » Normal
Status: Needs work » Fixed

If you look at the patch in #1, you'll see that along with the addition of 5207() came the removal of those same columns from project_issue_install(). So anyone who upgraded to pi 2.0 would have those columns in their database, and that's why they are removed in 5207(). So I don't think any of this is cruft, so setting this back to fixed.

dww’s picture

Ok, fair enough. At least they're conditional, so they're not going to cause errors.

Anonymous’s picture

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for two weeks with no activity.