Package com.google.gerrit.server.schema
Class Schema_146
- java.lang.Object
-
- com.google.gerrit.server.schema.SchemaVersion
-
- com.google.gerrit.server.schema.Schema_146
-
public class Schema_146 extends SchemaVersion
Make sure that for every account a user branch exists that has an initial empty commit with the registration date as commit time.For accounts that don't have a user branch yet the user branch is created with an initial empty commit that has the registration date as commit time.
For accounts that already have a user branch the user branch is rewritten and an initial empty commit with the registration date as commit time is inserted (if such a commit doesn't exist yet).
-
-
Field Summary
-
Fields inherited from class com.google.gerrit.server.schema.SchemaVersion
C
-
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
createUserBranch(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.ObjectInserter oi, org.eclipse.jgit.lib.ObjectId emptyTree, Account.Id accountId, Timestamp registeredOn)
protected void
migrateData(ReviewDb db, UpdateUI ui)
Invoked between updateSchema (adds new columns/tables) and pruneSchema (removes deleted columns/tables).-
Methods inherited from class com.google.gerrit.server.schema.SchemaVersion
check, execute, finish, getBinaryVersion, getPrior, getVersionNbr, guessVersion, newExecutor, newStatement, prepareStatement, preUpdateSchema, renameColumn, renameTable
-
-
-
-
Method Detail
-
migrateData
protected void migrateData(ReviewDb db, UpdateUI ui) throws com.google.gwtorm.server.OrmException, SQLException
Description copied from class:SchemaVersion
Invoked between updateSchema (adds new columns/tables) and pruneSchema (removes deleted columns/tables).- Overrides:
migrateData
in classSchemaVersion
- Parameters:
db
- open database handle.ui
- interface for interacting with the user.- Throws:
com.google.gwtorm.server.OrmException
- if a Gerrit-specific exception occurred.SQLException
- if an underlying SQL exception occurred.
-
createUserBranch
public void createUserBranch(org.eclipse.jgit.lib.Repository repo, org.eclipse.jgit.lib.ObjectInserter oi, org.eclipse.jgit.lib.ObjectId emptyTree, Account.Id accountId, Timestamp registeredOn) throws IOException
- Throws:
IOException
-
-