Merge branch 'stable-2.8' into stable-2.9

* stable-2.8:
  Keep old timestamps during data migration
This commit is contained in:
Shawn Pearce 2014-05-02 17:23:59 -07:00
commit 1a09de2e82

View File

@ -138,7 +138,8 @@ public class Schema_77 extends SchemaVersion {
private void migratePatchSetApprovals(ReviewDb db,
LegacyLabelTypes labelTypes) throws SQLException {
PreparedStatement stmt = ((JdbcSchema) db).getConnection().prepareStatement(
"UPDATE patch_set_approvals SET category_id = ? WHERE category_id = ?");
"UPDATE patch_set_approvals SET category_id = ?, granted=granted"
+ " WHERE category_id = ?");
try {
for (LegacyLabelType type : labelTypes.getLegacyLabelTypes()) {
stmt.setString(1, type.getName());