)]}'
{
  "commit": "477f8e296532c65d10dc27f6cff96462504c47f8",
  "tree": "33903ac4ce65e2ea8051465982c7c703028694ef",
  "parents": [
    "26e5a864e130c19accd802b7a62009ff9ce616a1"
  ],
  "author": {
    "name": "Saša Živkov",
    "email": "sasa.zivkov@sap.com",
    "time": "Wed Nov 26 15:42:03 2014 +0100"
  },
  "committer": {
    "name": "Saša Živkov",
    "email": "sasa.zivkov@sap.com",
    "time": "Fri Nov 28 09:19:01 2014 +0100"
  },
  "message": "postgres: fix PK drop, don\u0027t assume PK name as TABLE_pkey\n\nWhen dropping a primary key, postgres requires the primary key name to\nbe specified.  In the UpdatePrimaryKeys init step it was assumed that\nthe primary key name for a table X is always X_pkey. However, since the\nSchema_82 this pattern doesn\u0027t hold for those tables which were renamed\nin that migration, as the migration only renamed the tables. For\nexample, before Schema_82 we had a table name:\n\n  account_group_includes_by_uuid_audit\n\nand its primary key named:\n\n  account_group_includes_by_uuid_audit_pkey\n\nThis table was renamed to:\n\n  account_group_by_id_aud\n\nbut the primary key name didn\u0027t change. Therefore, the UpdatePrimaryKeys\nfailed to drop the primary key using the TABLE_pkey pattern and couldn\u0027t\nthen create the new primary key.\n\nInstead of assuming the TABLE_pkey pattern get the old primary key\nname from the DatabaseMetaData and use this name for dropping the\nexisting primary key.\n\nChange-Id: I671b9912110fc22c842d2c15930a2c7b9906bd48\n",
  "tree_diff": [
    {
      "type": "modify",
      "old_id": "0c99fcfd06047340971dcb0224f1677bcf101efc",
      "old_mode": 33188,
      "old_path": "gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/UpdatePrimaryKeys.java",
      "new_id": "79bd73072a05cdc84eb8c0580e5bd7794f14085f",
      "new_mode": 33188,
      "new_path": "gerrit-pgm/src/main/java/com/google/gerrit/pgm/init/UpdatePrimaryKeys.java"
    }
  ]
}
