google-code-export / student-worker-relational-database

Automatically exported from code.google.com/p/student-worker-relational-database
1 stars 1 forks source link

Time sheet performance change causes inconsistencies in existing data (Fix in report) #275

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
The performance change causes any timesheets that had a performance value of 
NULL/None before changed to 0. Once the timesheet performance are adjusted, 
it's changed to 1.

To fix this, either change the "0" values to NULL in the database before 
performances are customized. If it's too late, follow these steps (will only 
work if you have backups of your database):

1. restore a backup from after the update (around January 6)

2. Select the timesheet ids from the timesheet table into an outfile (as a 
.sql). I terminated lines with " or id = " to make the UPDATE command easier to 
create.

3. Alter the .sql file so that it's set to update the timesheet table and set 
the performance to NULL where the timesheet IDs are the outfile (.sql)
If you did my suggestion above, make sure you remove the last "or id =" and add 
a semicolon to the end of the line.

4. Back up your database

5. Run the .sql file into the database

Voila! it should be fixed.

Original issue reported on code.google.com by ca...@burkesoftware.com on 27 Jan 2012 at 6:38