MigrateAccountPatchReviewDb - Migrates AccountPatchReviewDb from one database backend to another.


java -jar gerrit.war MigrateAccountPatchReviewDb
  -d <SITE_PATH>
  [--sourceUrl] [--chunkSize]


Migrates AccountPatchReviewDb from one database backend to another. The AccountPatchReviewDb is a database used to store the user file reviewed flags.

This command is only intended to be run if the configuration parameter accountPatchReviewDb.url is set or changed.

To migrate AccountPatchReviewDb:

When using MySQL, the file_name column length in the account_patch_reviews table will be shortened from the standard 4096 characters down to 255 characters. This is due to a MySQL limitation on the max size of 767 bytes for each column in an index.



Location of the gerrit.config file, and all other per-site configuration data, supporting libraries and log files.


Url of source database. Only need to be specified if the source is not H2.


Chunk size of fetching from source and pushing to target on each time. Defaults to 100000.


This command can only be run on a server which has direct connectivity to the database.


To migrate from H2 to the database specified by accountPatchReviewDb.url in gerrit.config:

	$ java -jar gerrit.war MigrateAccountPatchReviewDb -d site_path