Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 1 | = MigrateAccountPatchReviewDb |
| 2 | |
| 3 | == NAME |
Gert van Dijk | 0c25d46 | 2017-10-19 22:57:25 +0200 | [diff] [blame] | 4 | MigrateAccountPatchReviewDb - Migrates AccountPatchReviewDb from one database |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 5 | backend to another. |
| 6 | |
| 7 | == SYNOPSIS |
| 8 | [verse] |
| 9 | -- |
| 10 | _java_ -jar gerrit.war MigrateAccountPatchReviewDb |
| 11 | -d <SITE_PATH> |
| 12 | [--sourceUrl] [--chunkSize] |
| 13 | -- |
| 14 | |
| 15 | == DESCRIPTION |
| 16 | Migrates AccountPatchReviewDb from one database backend to another. The |
| 17 | AccountPatchReviewDb is a database used to store the user file reviewed flags. |
| 18 | |
David Pursehouse | 6cd0a79 | 2017-04-26 11:40:48 +0200 | [diff] [blame] | 19 | This command is only intended to be run if the configuration parameter |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 20 | link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
| 21 | is set or changed. |
| 22 | |
| 23 | To migrate AccountPatchReviewDb: |
| 24 | |
| 25 | * Stop Gerrit |
| 26 | * Configure new value for link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
David Pursehouse | 6cd0a79 | 2017-04-26 11:40:48 +0200 | [diff] [blame] | 27 | * Migrate data using this command |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 28 | * Start Gerrit |
| 29 | |
Saša Živkov | 1abb73e | 2018-02-15 11:51:51 +0100 | [diff] [blame] | 30 | [NOTE] |
| 31 | When using MySQL, the file_name column length in the account_patch_reviews table will be shortened |
| 32 | from the standard 4096 characters down to 255 characters. This is due to a |
| 33 | link:https://dev.mysql.com/doc/refman/5.7/en/innodb-restrictions.html[MySQL limitation] |
| 34 | on the max size of 767 bytes for each column in an index. |
| 35 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 36 | == OPTIONS |
| 37 | |
| 38 | -d:: |
Gert van Dijk | 0c25d46 | 2017-10-19 22:57:25 +0200 | [diff] [blame] | 39 | --site-path:: |
| 40 | Location of the `gerrit.config` file, and all other per-site |
| 41 | configuration data, supporting libraries and log files. |
| 42 | |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 43 | --sourceUrl:: |
| 44 | Url of source database. Only need to be specified if the source is not H2. |
| 45 | |
| 46 | --chunkSize:: |
| 47 | Chunk size of fetching from source and pushing to target on each time. |
| 48 | Defaults to 100000. |
| 49 | |
| 50 | == CONTEXT |
| 51 | This command can only be run on a server which has direct |
| 52 | connectivity to the database. |
| 53 | |
| 54 | == EXAMPLES |
| 55 | To migrate from H2 to the database specified by |
| 56 | link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
| 57 | in gerrit.config: |
| 58 | |
| 59 | ---- |
Gert van Dijk | 0c25d46 | 2017-10-19 22:57:25 +0200 | [diff] [blame] | 60 | $ java -jar gerrit.war MigrateAccountPatchReviewDb -d site_path |
Hongkai Liu | 49799b2 | 2017-04-07 16:54:25 -0400 | [diff] [blame] | 61 | ---- |
| 62 | |
| 63 | == SEE ALSO |
| 64 | |
| 65 | * Configuration parameter link:config-gerrit.html#accountPatchReviewDb.url[accountPatchReviewDb.url] |
| 66 | |
| 67 | GERRIT |
| 68 | ------ |
| 69 | Part of link:index.html[Gerrit Code Review] |
| 70 | |
| 71 | SEARCHBOX |
| 72 | --------- |