Keep old timestamps during data migration

As part of the update to patch_set_approavals, the category names
are changed. Doing so causes "ON UPDATE CURRENT_TIMESTAMP" in at
least MySQL to replace all of the existing timestamps with the
time of the migration. Since the purpose of CURRENT_TIMESTAMP
here is to track when the approval vote happened, this is a loss
of data.

Amend the data migration to include granted=granted in the update
list so that anyone running the migration will not lose their
data.

Change-Id: If80891018eae0fab75770a5aea5a382200e9112f
diff --git a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_77.java b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_77.java
index 80639d6..facfb75 100644
--- a/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_77.java
+++ b/gerrit-server/src/main/java/com/google/gerrit/server/schema/Schema_77.java
@@ -138,7 +138,8 @@
   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());