home *** CD-ROM | disk | FTP | other *** search
/ Chip 2004 April / CMCD0404.ISO / Software / Freeware / Programare / dotproject / modules / ticketsmith / UPGRADE < prev    next >
Encoding:
Text File  |  2001-10-18  |  2.4 KB  |  58 lines

  1. ---------------
  2.  Upgrade Notes
  3. ---------------
  4.  
  5. Upgrading from any version pre-0.6.2
  6. ------------------------------------
  7. You will need to add two columns to the 'tickets' table: 
  8.  
  9.     ALTER TABLE tickets ADD COLUMN recipient varchar(100) DEFAULT '' NOT NULL;
  10.     ALTER TABLE tickets ADD COLUMN attachment tinyint(1) unsigned DEFAULT '0' NOT NULL;
  11.  
  12. These store the followup recipient and the indication of whether there was an 
  13. attachment in the original ticket.  
  14.  
  15. Upgrading from any version pre-0.4
  16. ----------------------------------
  17. Regardless of your prior version, you will have to add two indexes to the 
  18. 'tickets' table which were added to speed up queries.  You will also need 
  19. to change a column name and change the size of a field (details below). 
  20. You can do this with the following MySQL commands:  
  21.  
  22.     ALTER TABLE tickets ADD INDEX parent (parent);
  23.     ALTER TABLE tickets ADD INDEX type (type);
  24.     ALTER TABLE tickets CHANGE client author varchar(100) DEFAULT '' NOT NULL;
  25.     ALTER TABLE tickets CHANGE cc cc varchar(100) DEFAULT '' NOT NULL;
  26.  
  27. Lastly, you should be sure to protect gateway.pl as described in the setup 
  28. instructions in the README file.  
  29.  
  30. Upgrading from v0.3 or v0.3.1
  31. ----------------------------
  32. You will need to convert any entries in your 'comments' table to entries in the 
  33. 'tickets' table.  I've decided to keep all types of correspondence in the same table.  
  34. You can do this as follows:  
  35.  
  36.     INSERT INTO tickets (author, timestamp, parent, body) \
  37.         SELECT poster, timestamp, ticket, body FROM comments; (that's all one line)
  38.     
  39.     UPDATE tickets SET author = 'Staff Member', subject = 'Comment' WHERE type = ''
  40.     UPDATE tickets SET type = 'Staff Comment', assignment = '9999' WHERE type = '';
  41.     
  42. This unfortunately will leave your migrated comments with generic authors and 
  43. subjects, but this is the only way I know of doing it in strict SQL.  I realize 
  44. that all of this is kind of hardcore, and I apologize for that, but if you don't mind 
  45. losing your comments (we personally only have a few) then you can skip the migration 
  46. and go straight to the drop:  
  47.  
  48.     DROP table comments;
  49.     
  50. I also cleaned up some followup-related code so you can drop a column:  
  51.  
  52.     ALTER table tickets DROP followup_id;
  53.  
  54. Upgrading from v0.1
  55. -------------------
  56. You'll want to add a 'priority' column to the 'tickets' table and update 
  57. all current tickets to have a priority of '1'.  
  58.