From 8d58a9ab17eafd6e8186d2cb7fe90430637c451a Mon Sep 17 00:00:00 2001 From: Dave Borowitz Date: Tue, 13 Nov 2018 12:18:47 -0800 Subject: [PATCH] Rename some Schema* classes to ReviewDbSchema* In preparation for creating NoteDb analogues, which may share names. Change-Id: I1969d1a00636ba2894f943f19ff18a4956585b44 --- .../gerrit/acceptance/AbstractDaemonTest.java | 11 +++++---- .../InMemoryTestingDatabaseModule.java | 8 +++---- .../gerrit/httpd/init/WebAppInitializer.java | 8 +++---- java/com/google/gerrit/pgm/Daemon.java | 6 ++--- .../gerrit/pgm/LocalUsernamesToLowerCase.java | 4 ++-- java/com/google/gerrit/pgm/init/BaseInit.java | 6 ++--- .../google/gerrit/pgm/util/SiteProgram.java | 4 ++-- .../gerrit/reviewdb/server/ReviewDb.java | 2 +- ...reator.java => ReviewDbSchemaCreator.java} | 8 +++---- ...aModule.java => ReviewDbSchemaModule.java} | 2 +- ...pdater.java => ReviewDbSchemaUpdater.java} | 18 +++++++------- ...ersion.java => ReviewDbSchemaVersion.java} | 24 +++++++++---------- ...k.java => ReviewDbSchemaVersionCheck.java} | 8 +++---- .../gerrit/server/schema/Schema_100.java | 2 +- .../gerrit/server/schema/Schema_101.java | 2 +- .../gerrit/server/schema/Schema_102.java | 2 +- .../gerrit/server/schema/Schema_103.java | 2 +- .../gerrit/server/schema/Schema_104.java | 2 +- .../gerrit/server/schema/Schema_105.java | 2 +- .../gerrit/server/schema/Schema_106.java | 2 +- .../gerrit/server/schema/Schema_107.java | 2 +- .../gerrit/server/schema/Schema_108.java | 2 +- .../gerrit/server/schema/Schema_109.java | 2 +- .../gerrit/server/schema/Schema_110.java | 2 +- .../gerrit/server/schema/Schema_111.java | 2 +- .../gerrit/server/schema/Schema_112.java | 2 +- .../gerrit/server/schema/Schema_113.java | 2 +- .../gerrit/server/schema/Schema_114.java | 2 +- .../gerrit/server/schema/Schema_115.java | 2 +- .../gerrit/server/schema/Schema_116.java | 2 +- .../gerrit/server/schema/Schema_117.java | 2 +- .../gerrit/server/schema/Schema_118.java | 2 +- .../gerrit/server/schema/Schema_119.java | 2 +- .../gerrit/server/schema/Schema_120.java | 2 +- .../gerrit/server/schema/Schema_121.java | 2 +- .../gerrit/server/schema/Schema_122.java | 2 +- .../gerrit/server/schema/Schema_123.java | 2 +- .../gerrit/server/schema/Schema_124.java | 2 +- .../gerrit/server/schema/Schema_125.java | 2 +- .../gerrit/server/schema/Schema_126.java | 2 +- .../gerrit/server/schema/Schema_127.java | 2 +- .../gerrit/server/schema/Schema_128.java | 2 +- .../gerrit/server/schema/Schema_129.java | 2 +- .../gerrit/server/schema/Schema_130.java | 2 +- .../gerrit/server/schema/Schema_131.java | 2 +- .../gerrit/server/schema/Schema_132.java | 2 +- .../gerrit/server/schema/Schema_133.java | 2 +- .../gerrit/server/schema/Schema_134.java | 2 +- .../gerrit/server/schema/Schema_135.java | 2 +- .../gerrit/server/schema/Schema_136.java | 2 +- .../gerrit/server/schema/Schema_137.java | 2 +- .../gerrit/server/schema/Schema_138.java | 2 +- .../gerrit/server/schema/Schema_139.java | 2 +- .../gerrit/server/schema/Schema_140.java | 2 +- .../gerrit/server/schema/Schema_141.java | 2 +- .../gerrit/server/schema/Schema_142.java | 2 +- .../gerrit/server/schema/Schema_143.java | 2 +- .../gerrit/server/schema/Schema_144.java | 2 +- .../gerrit/server/schema/Schema_145.java | 2 +- .../gerrit/server/schema/Schema_146.java | 2 +- .../gerrit/server/schema/Schema_147.java | 2 +- .../gerrit/server/schema/Schema_148.java | 2 +- .../gerrit/server/schema/Schema_149.java | 2 +- .../gerrit/server/schema/Schema_150.java | 2 +- .../gerrit/server/schema/Schema_151.java | 2 +- .../gerrit/server/schema/Schema_152.java | 2 +- .../gerrit/server/schema/Schema_153.java | 2 +- .../gerrit/server/schema/Schema_154.java | 2 +- .../gerrit/server/schema/Schema_155.java | 2 +- .../gerrit/server/schema/Schema_156.java | 2 +- .../gerrit/server/schema/Schema_157.java | 2 +- .../gerrit/server/schema/Schema_158.java | 2 +- .../gerrit/server/schema/Schema_159.java | 2 +- .../gerrit/server/schema/Schema_160.java | 2 +- .../gerrit/server/schema/Schema_161.java | 2 +- .../gerrit/server/schema/Schema_162.java | 2 +- .../gerrit/server/schema/Schema_163.java | 2 +- .../gerrit/server/schema/Schema_164.java | 2 +- .../gerrit/server/schema/Schema_165.java | 2 +- .../gerrit/server/schema/Schema_166.java | 2 +- .../gerrit/server/schema/Schema_167.java | 2 +- .../gerrit/server/schema/Schema_168.java | 2 +- .../gerrit/server/schema/Schema_169.java | 2 +- .../gerrit/server/schema/Schema_83.java | 6 ++--- .../gerrit/server/schema/Schema_84.java | 2 +- .../gerrit/server/schema/Schema_85.java | 2 +- .../gerrit/server/schema/Schema_86.java | 2 +- .../gerrit/server/schema/Schema_87.java | 2 +- .../gerrit/server/schema/Schema_88.java | 2 +- .../gerrit/server/schema/Schema_89.java | 2 +- .../gerrit/server/schema/Schema_90.java | 2 +- .../gerrit/server/schema/Schema_91.java | 2 +- .../gerrit/server/schema/Schema_92.java | 2 +- .../gerrit/server/schema/Schema_93.java | 2 +- .../gerrit/server/schema/Schema_94.java | 2 +- .../gerrit/server/schema/Schema_95.java | 2 +- .../gerrit/server/schema/Schema_96.java | 2 +- .../gerrit/server/schema/Schema_97.java | 2 +- .../gerrit/server/schema/Schema_98.java | 2 +- .../gerrit/server/schema/Schema_99.java | 2 +- .../gerrit/testing/InMemoryDatabase.java | 12 +++++----- .../google/gerrit/testing/InMemoryModule.java | 4 ++-- .../testing/InMemoryTestEnvironment.java | 4 ++-- .../gpg/GerritPublicKeyCheckerTest.java | 4 ++-- .../server/change/LabelNormalizerTest.java | 4 ++-- .../server/permissions/RefControlTest.java | 4 ++-- .../account/AbstractQueryAccountsTest.java | 4 ++-- .../change/AbstractQueryChangesTest.java | 4 ++-- .../query/group/AbstractQueryGroupsTest.java | 4 ++-- .../project/AbstractQueryProjectsTest.java | 4 ++-- ...st.java => ReviewDbSchemaCreatorTest.java} | 2 +- ...st.java => ReviewDbSchemaUpdaterTest.java} | 10 ++++---- ...ema_166_to_167_WithGroupsInNoteDbTest.java | 2 +- ...a_166_to_167_WithGroupsInReviewDbTest.java | 8 +++---- 114 files changed, 180 insertions(+), 177 deletions(-) rename java/com/google/gerrit/server/schema/{SchemaCreator.java => ReviewDbSchemaCreator.java} (98%) rename java/com/google/gerrit/server/schema/{SchemaModule.java => ReviewDbSchemaModule.java} (97%) rename java/com/google/gerrit/server/schema/{SchemaUpdater.java => ReviewDbSchemaUpdater.java} (91%) rename java/com/google/gerrit/server/schema/{SchemaVersion.java => ReviewDbSchemaVersion.java} (88%) rename java/com/google/gerrit/server/schema/{SchemaVersionCheck.java => ReviewDbSchemaVersionCheck.java} (91%) rename javatests/com/google/gerrit/server/schema/{SchemaCreatorTest.java => ReviewDbSchemaCreatorTest.java} (99%) rename javatests/com/google/gerrit/server/schema/{SchemaUpdaterTest.java => ReviewDbSchemaUpdaterTest.java} (95%) diff --git a/java/com/google/gerrit/acceptance/AbstractDaemonTest.java b/java/com/google/gerrit/acceptance/AbstractDaemonTest.java index 0107bae598..2c75875603 100644 --- a/java/com/google/gerrit/acceptance/AbstractDaemonTest.java +++ b/java/com/google/gerrit/acceptance/AbstractDaemonTest.java @@ -428,11 +428,12 @@ public abstract class AbstractDaemonTest { db = reviewDbProvider.open(); - // All groups which were added during the server start (e.g. in SchemaCreator) aren't contained - // in the instance of the group index which is available here and in tests. There are two - // reasons: - // 1) No group index is available in SchemaCreator when using an in-memory database. (This could - // be fixed by using the IndexManagerOnInit in InMemoryDatabase similar as BaseInit uses it.) + // All groups which were added during the server start (e.g. in ReviewDbSchemaCreator) aren't + // contained in the instance of the group index which is available here and in tests. There are + // two reasons: + // 1) No group index is available in ReviewDbSchemaCreator when using an in-memory database. + // (This could be fixed by using the IndexManagerOnInit in InMemoryDatabase similar as BaseInit + // uses it.) // 2) During the on-init part of the server start, we use another instance of the index than // later on. As test indexes are non-permanent, closing an instance and opening another one // removes all indexed data. diff --git a/java/com/google/gerrit/acceptance/InMemoryTestingDatabaseModule.java b/java/com/google/gerrit/acceptance/InMemoryTestingDatabaseModule.java index 6ee5c096e8..0bbf9f1fa3 100644 --- a/java/com/google/gerrit/acceptance/InMemoryTestingDatabaseModule.java +++ b/java/com/google/gerrit/acceptance/InMemoryTestingDatabaseModule.java @@ -34,8 +34,8 @@ import com.google.gerrit.server.notedb.NotesMigration; import com.google.gerrit.server.schema.DataSourceType; import com.google.gerrit.server.schema.NotesMigrationSchemaFactory; import com.google.gerrit.server.schema.ReviewDbFactory; -import com.google.gerrit.server.schema.SchemaModule; -import com.google.gerrit.server.schema.SchemaVersion; +import com.google.gerrit.server.schema.ReviewDbSchemaModule; +import com.google.gerrit.server.schema.ReviewDbSchemaVersion; import com.google.gerrit.testing.InMemoryDatabase; import com.google.gerrit.testing.InMemoryH2Type; import com.google.gerrit.testing.InMemoryRepositoryManager; @@ -101,8 +101,8 @@ class InMemoryTestingDatabaseModule extends LifecycleModule { bind(SitePaths.class); bind(TrackingFooters.class).toProvider(TrackingFootersProvider.class).in(SINGLETON); - install(new SchemaModule()); - bind(SchemaVersion.class).to(SchemaVersion.C); + install(new ReviewDbSchemaModule()); + bind(ReviewDbSchemaVersion.class).to(ReviewDbSchemaVersion.C); install(new SshdModule()); } diff --git a/java/com/google/gerrit/httpd/init/WebAppInitializer.java b/java/com/google/gerrit/httpd/init/WebAppInitializer.java index 5b7173ebc5..b83da19c4e 100644 --- a/java/com/google/gerrit/httpd/init/WebAppInitializer.java +++ b/java/com/google/gerrit/httpd/init/WebAppInitializer.java @@ -88,8 +88,8 @@ import com.google.gerrit.server.schema.DataSourceProvider; import com.google.gerrit.server.schema.DataSourceType; import com.google.gerrit.server.schema.DatabaseModule; import com.google.gerrit.server.schema.JdbcAccountPatchReviewStore; -import com.google.gerrit.server.schema.SchemaModule; -import com.google.gerrit.server.schema.SchemaVersionCheck; +import com.google.gerrit.server.schema.ReviewDbSchemaModule; +import com.google.gerrit.server.schema.ReviewDbSchemaVersionCheck; import com.google.gerrit.server.securestore.SecureStoreClassName; import com.google.gerrit.server.ssh.NoSshModule; import com.google.gerrit.server.ssh.SshAddressesModule; @@ -317,8 +317,8 @@ public class WebAppInitializer extends GuiceServletContextListener implements Fi private Injector createCfgInjector() { final List modules = new ArrayList<>(); - modules.add(new SchemaModule()); - modules.add(SchemaVersionCheck.module()); + modules.add(new ReviewDbSchemaModule()); + modules.add(ReviewDbSchemaVersionCheck.module()); modules.add(new AuthConfigModule()); return dbInjector.createChildInjector(modules); } diff --git a/java/com/google/gerrit/pgm/Daemon.java b/java/com/google/gerrit/pgm/Daemon.java index 7284d708cd..e581514016 100644 --- a/java/com/google/gerrit/pgm/Daemon.java +++ b/java/com/google/gerrit/pgm/Daemon.java @@ -97,7 +97,7 @@ import com.google.gerrit.server.restapi.RestApiModule; import com.google.gerrit.server.schema.DataSourceProvider; import com.google.gerrit.server.schema.InMemoryAccountPatchReviewStore; import com.google.gerrit.server.schema.JdbcAccountPatchReviewStore; -import com.google.gerrit.server.schema.SchemaVersionCheck; +import com.google.gerrit.server.schema.ReviewDbSchemaVersionCheck; import com.google.gerrit.server.securestore.DefaultSecureStore; import com.google.gerrit.server.securestore.SecureStore; import com.google.gerrit.server.securestore.SecureStoreClassName; @@ -289,7 +289,7 @@ public class Daemon extends SiteProgram { JythonShell shell = new JythonShell(); shell.set("m", manager); shell.set("ds", dbInjector.getInstance(DataSourceProvider.class)); - shell.set("schk", dbInjector.getInstance(SchemaVersionCheck.class)); + shell.set("schk", dbInjector.getInstance(ReviewDbSchemaVersionCheck.class)); shell.set("d", this); shell.run(); } else { @@ -391,7 +391,7 @@ public class Daemon extends SiteProgram { private Injector createSysInjector() { final List modules = new ArrayList<>(); - modules.add(SchemaVersionCheck.module()); + modules.add(ReviewDbSchemaVersionCheck.module()); modules.add(new DropWizardMetricMaker.RestModule()); modules.add(new LogFileCompressor.Module()); diff --git a/java/com/google/gerrit/pgm/LocalUsernamesToLowerCase.java b/java/com/google/gerrit/pgm/LocalUsernamesToLowerCase.java index 5bfc00f783..6ebd6a3ba5 100644 --- a/java/com/google/gerrit/pgm/LocalUsernamesToLowerCase.java +++ b/java/com/google/gerrit/pgm/LocalUsernamesToLowerCase.java @@ -29,7 +29,7 @@ import com.google.gerrit.server.extensions.events.GitReferenceUpdated; import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.git.meta.MetaDataUpdate; import com.google.gerrit.server.index.account.AccountSchemaDefinitions; -import com.google.gerrit.server.schema.SchemaVersionCheck; +import com.google.gerrit.server.schema.ReviewDbSchemaVersionCheck; import com.google.gwtorm.server.OrmDuplicateKeyException; import com.google.inject.Inject; import com.google.inject.Injector; @@ -55,7 +55,7 @@ public class LocalUsernamesToLowerCase extends SiteProgram { @Override public int run() throws Exception { Injector dbInjector = createDbInjector(MULTI_USER); - manager.add(dbInjector, dbInjector.createChildInjector(SchemaVersionCheck.module())); + manager.add(dbInjector, dbInjector.createChildInjector(ReviewDbSchemaVersionCheck.module())); manager.start(); dbInjector .createChildInjector( diff --git a/java/com/google/gerrit/pgm/init/BaseInit.java b/java/com/google/gerrit/pgm/init/BaseInit.java index deaf139aad..71957e1522 100644 --- a/java/com/google/gerrit/pgm/init/BaseInit.java +++ b/java/com/google/gerrit/pgm/init/BaseInit.java @@ -43,7 +43,7 @@ import com.google.gerrit.server.git.GitRepositoryManager; import com.google.gerrit.server.index.IndexModule; import com.google.gerrit.server.plugins.JarScanner; import com.google.gerrit.server.schema.ReviewDbFactory; -import com.google.gerrit.server.schema.SchemaUpdater; +import com.google.gerrit.server.schema.ReviewDbSchemaUpdater; import com.google.gerrit.server.schema.UpdateUI; import com.google.gerrit.server.securestore.SecureStore; import com.google.gerrit.server.securestore.SecureStoreClassName; @@ -358,7 +358,7 @@ public class BaseInit extends SiteProgram { public final ConsoleUI ui; public final SitePaths site; public final InitFlags flags; - final SchemaUpdater schemaUpdater; + final ReviewDbSchemaUpdater schemaUpdater; final SchemaFactory schema; final GitRepositoryManager repositoryManager; @@ -367,7 +367,7 @@ public class BaseInit extends SiteProgram { ConsoleUI ui, SitePaths site, InitFlags flags, - SchemaUpdater schemaUpdater, + ReviewDbSchemaUpdater schemaUpdater, @ReviewDbFactory SchemaFactory schema, GitRepositoryManager repositoryManager) { this.ui = ui; diff --git a/java/com/google/gerrit/pgm/util/SiteProgram.java b/java/com/google/gerrit/pgm/util/SiteProgram.java index 1338efbe02..65feeab2cf 100644 --- a/java/com/google/gerrit/pgm/util/SiteProgram.java +++ b/java/com/google/gerrit/pgm/util/SiteProgram.java @@ -34,7 +34,7 @@ import com.google.gerrit.server.schema.DataSourceModule; import com.google.gerrit.server.schema.DataSourceProvider; import com.google.gerrit.server.schema.DataSourceType; import com.google.gerrit.server.schema.DatabaseModule; -import com.google.gerrit.server.schema.SchemaModule; +import com.google.gerrit.server.schema.ReviewDbSchemaModule; import com.google.gerrit.server.securestore.SecureStoreClassName; import com.google.gwtorm.server.OrmException; import com.google.inject.AbstractModule; @@ -188,7 +188,7 @@ public abstract class SiteProgram extends AbstractProgram { } }); modules.add(new DatabaseModule()); - modules.add(new SchemaModule()); + modules.add(new ReviewDbSchemaModule()); modules.add(cfgInjector.getInstance(GitRepositoryManagerModule.class)); modules.add(new NotesMigration.Module()); diff --git a/java/com/google/gerrit/reviewdb/server/ReviewDb.java b/java/com/google/gerrit/reviewdb/server/ReviewDb.java index 4e648b9466..9cdc0f7919 100644 --- a/java/com/google/gerrit/reviewdb/server/ReviewDb.java +++ b/java/com/google/gerrit/reviewdb/server/ReviewDb.java @@ -35,7 +35,7 @@ import com.google.gwtorm.server.Sequence; * */ public interface ReviewDb extends Schema { - /* If you change anything, update SchemaVersion.C to use a new version. */ + /* If you change anything, update ReviewDbSchemaVersion.C to use a new version. */ @Relation(id = 1) SchemaVersionAccess schemaVersion(); diff --git a/java/com/google/gerrit/server/schema/SchemaCreator.java b/java/com/google/gerrit/server/schema/ReviewDbSchemaCreator.java similarity index 98% rename from java/com/google/gerrit/server/schema/SchemaCreator.java rename to java/com/google/gerrit/server/schema/ReviewDbSchemaCreator.java index 743019d8d6..30d07f32a0 100644 --- a/java/com/google/gerrit/server/schema/SchemaCreator.java +++ b/java/com/google/gerrit/server/schema/ReviewDbSchemaCreator.java @@ -59,7 +59,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; /** Creates the current database schema and populates initial code rows. */ -public class SchemaCreator { +public class ReviewDbSchemaCreator { @SitePath private final Path site_path; private final GitRepositoryManager repoManager; @@ -77,7 +77,7 @@ public class SchemaCreator { private final AllProjectsName allProjectsName; @Inject - public SchemaCreator( + public ReviewDbSchemaCreator( SitePaths site, GitRepositoryManager repoManager, AllProjectsCreator ap, @@ -107,7 +107,7 @@ public class SchemaCreator { apName); } - public SchemaCreator( + public ReviewDbSchemaCreator( @SitePath Path site, GitRepositoryManager repoManager, AllProjectsCreator ap, @@ -144,7 +144,7 @@ public class SchemaCreator { } final CurrentSchemaVersion sVer = CurrentSchemaVersion.create(); - sVer.versionNbr = SchemaVersion.getBinaryVersion(); + sVer.versionNbr = ReviewDbSchemaVersion.getBinaryVersion(); db.schemaVersion().insert(Collections.singleton(sVer)); GroupReference admins = createGroupReference("Administrators"); diff --git a/java/com/google/gerrit/server/schema/SchemaModule.java b/java/com/google/gerrit/server/schema/ReviewDbSchemaModule.java similarity index 97% rename from java/com/google/gerrit/server/schema/SchemaModule.java rename to java/com/google/gerrit/server/schema/ReviewDbSchemaModule.java index 9ce19fe03f..da8898a43c 100644 --- a/java/com/google/gerrit/server/schema/SchemaModule.java +++ b/java/com/google/gerrit/server/schema/ReviewDbSchemaModule.java @@ -30,7 +30,7 @@ import com.google.gerrit.server.config.GerritServerIdProvider; import org.eclipse.jgit.lib.PersonIdent; /** Validate the schema and connect to Git. */ -public class SchemaModule extends FactoryModule { +public class ReviewDbSchemaModule extends FactoryModule { @Override protected void configure() { bind(PersonIdent.class) diff --git a/java/com/google/gerrit/server/schema/SchemaUpdater.java b/java/com/google/gerrit/server/schema/ReviewDbSchemaUpdater.java similarity index 91% rename from java/com/google/gerrit/server/schema/SchemaUpdater.java rename to java/com/google/gerrit/server/schema/ReviewDbSchemaUpdater.java index 266fbaa894..aa6e9f881b 100644 --- a/java/com/google/gerrit/server/schema/SchemaUpdater.java +++ b/java/com/google/gerrit/server/schema/ReviewDbSchemaUpdater.java @@ -44,22 +44,22 @@ import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.PersonIdent; /** Creates or updates the current database schema. */ -public class SchemaUpdater { +public class ReviewDbSchemaUpdater { private final SchemaFactory schema; private final SitePaths site; - private final SchemaCreator creator; - private final Provider updater; + private final ReviewDbSchemaCreator creator; + private final Provider updater; @Inject - SchemaUpdater( + ReviewDbSchemaUpdater( @ReviewDbFactory SchemaFactory schema, SitePaths site, - SchemaCreator creator, + ReviewDbSchemaCreator creator, Injector parent) { this.schema = schema; this.site = site; this.creator = creator; - this.updater = buildInjector(parent).getProvider(SchemaVersion.class); + this.updater = buildInjector(parent).getProvider(ReviewDbSchemaVersion.class); } private static Injector buildInjector(Injector parent) { @@ -71,7 +71,7 @@ public class SchemaUpdater { new AbstractModule() { @Override protected void configure() { - bind(SchemaVersion.class).to(SchemaVersion.C); + bind(ReviewDbSchemaVersion.class).to(ReviewDbSchemaVersion.C); for (Key k : new Key[] { @@ -104,7 +104,7 @@ public class SchemaUpdater { public void update(UpdateUI ui) throws OrmException { try (ReviewDb db = ReviewDbUtil.unwrapDb(schema.open())) { - final SchemaVersion u = updater.get(); + final ReviewDbSchemaVersion u = updater.get(); final CurrentSchemaVersion version = getSchemaVersion(db); if (version == null) { try { @@ -126,7 +126,7 @@ public class SchemaUpdater { } @VisibleForTesting - public SchemaVersion getLatestSchemaVersion() { + public ReviewDbSchemaVersion getLatestSchemaVersion() { return updater.get(); } diff --git a/java/com/google/gerrit/server/schema/SchemaVersion.java b/java/com/google/gerrit/server/schema/ReviewDbSchemaVersion.java similarity index 88% rename from java/com/google/gerrit/server/schema/SchemaVersion.java rename to java/com/google/gerrit/server/schema/ReviewDbSchemaVersion.java index 61e9c926c4..46dd600389 100644 --- a/java/com/google/gerrit/server/schema/SchemaVersion.java +++ b/java/com/google/gerrit/server/schema/ReviewDbSchemaVersion.java @@ -34,7 +34,7 @@ import java.util.List; import java.util.concurrent.TimeUnit; /** A version of the database schema. */ -public abstract class SchemaVersion { +public abstract class ReviewDbSchemaVersion { /** The current schema version. */ public static final Class C = Schema_169.class; @@ -42,10 +42,10 @@ public abstract class SchemaVersion { return guessVersion(C); } - private final Provider prior; + private final Provider prior; private final int versionNbr; - protected SchemaVersion(Provider prior) { + protected ReviewDbSchemaVersion(Provider prior) { this.prior = prior; this.versionNbr = guessVersion(getClass()); } @@ -66,7 +66,7 @@ public abstract class SchemaVersion { } @VisibleForTesting - public final SchemaVersion getPrior() { + public final ReviewDbSchemaVersion getPrior() { return prior.get(); } @@ -89,7 +89,7 @@ public abstract class SchemaVersion { /** Runs check on the prior schema version, and then upgrades. */ private void upgradeFrom(UpdateUI ui, CurrentSchemaVersion curr, ReviewDb db) throws OrmException, SQLException { - List pending = pending(curr.versionNbr); + List pending = pending(curr.versionNbr); updateSchema(pending, ui, db); migrateData(pending, ui, curr, db); @@ -115,18 +115,18 @@ public abstract class SchemaVersion { } } - private List pending(int curr) { - List r = Lists.newArrayListWithCapacity(versionNbr - curr); - for (SchemaVersion v = this; curr < v.getVersionNbr(); v = v.prior.get()) { + private List pending(int curr) { + List r = Lists.newArrayListWithCapacity(versionNbr - curr); + for (ReviewDbSchemaVersion v = this; curr < v.getVersionNbr(); v = v.prior.get()) { r.add(v); } Collections.reverse(r); return r; } - private void updateSchema(List pending, UpdateUI ui, ReviewDb db) + private void updateSchema(List pending, UpdateUI ui, ReviewDb db) throws OrmException, SQLException { - for (SchemaVersion v : pending) { + for (ReviewDbSchemaVersion v : pending) { ui.message(String.format("Upgrading schema to %d ...", v.getVersionNbr())); v.preUpdateSchema(db); } @@ -147,9 +147,9 @@ public abstract class SchemaVersion { protected void preUpdateSchema(ReviewDb db) throws OrmException, SQLException {} private void migrateData( - List pending, UpdateUI ui, CurrentSchemaVersion curr, ReviewDb db) + List pending, UpdateUI ui, CurrentSchemaVersion curr, ReviewDb db) throws OrmException, SQLException { - for (SchemaVersion v : pending) { + for (ReviewDbSchemaVersion v : pending) { Stopwatch sw = Stopwatch.createStarted(); ui.message(String.format("Migrating data to schema %d ...", v.getVersionNbr())); v.migrateData(db, ui); diff --git a/java/com/google/gerrit/server/schema/SchemaVersionCheck.java b/java/com/google/gerrit/server/schema/ReviewDbSchemaVersionCheck.java similarity index 91% rename from java/com/google/gerrit/server/schema/SchemaVersionCheck.java rename to java/com/google/gerrit/server/schema/ReviewDbSchemaVersionCheck.java index bdc15f4cb0..12abc7e1e7 100644 --- a/java/com/google/gerrit/server/schema/SchemaVersionCheck.java +++ b/java/com/google/gerrit/server/schema/ReviewDbSchemaVersionCheck.java @@ -26,12 +26,12 @@ import com.google.inject.Module; import com.google.inject.ProvisionException; /** Validates the current schema version. */ -public class SchemaVersionCheck implements LifecycleListener { +public class ReviewDbSchemaVersionCheck implements LifecycleListener { public static Module module() { return new LifecycleModule() { @Override protected void configure() { - listener().to(SchemaVersionCheck.class); + listener().to(ReviewDbSchemaVersionCheck.class); } }; } @@ -40,7 +40,7 @@ public class SchemaVersionCheck implements LifecycleListener { private final SitePaths site; @Inject - public SchemaVersionCheck(SchemaFactory schemaFactory, SitePaths site) { + public ReviewDbSchemaVersionCheck(SchemaFactory schemaFactory, SitePaths site) { this.schema = schemaFactory; this.site = site; } @@ -49,7 +49,7 @@ public class SchemaVersionCheck implements LifecycleListener { public void start() { try (ReviewDb db = schema.open()) { final CurrentSchemaVersion currentVer = getSchemaVersion(db); - final int expectedVer = SchemaVersion.getBinaryVersion(); + final int expectedVer = ReviewDbSchemaVersion.getBinaryVersion(); if (currentVer == null) { throw new ProvisionException( diff --git a/java/com/google/gerrit/server/schema/Schema_100.java b/java/com/google/gerrit/server/schema/Schema_100.java index 090219498e..b5105a92db 100644 --- a/java/com/google/gerrit/server/schema/Schema_100.java +++ b/java/com/google/gerrit/server/schema/Schema_100.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_100 extends SchemaVersion { +public class Schema_100 extends ReviewDbSchemaVersion { @Inject Schema_100(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_101.java b/java/com/google/gerrit/server/schema/Schema_101.java index ccbb2dee1f..753d992687 100644 --- a/java/com/google/gerrit/server/schema/Schema_101.java +++ b/java/com/google/gerrit/server/schema/Schema_101.java @@ -38,7 +38,7 @@ import java.util.Locale; import java.util.Map; import java.util.TreeMap; -public class Schema_101 extends SchemaVersion { +public class Schema_101 extends ReviewDbSchemaVersion { private static class PrimaryKey { String oldNameInDb; diff --git a/java/com/google/gerrit/server/schema/Schema_102.java b/java/com/google/gerrit/server/schema/Schema_102.java index 1c1aa55256..2bd52c2325 100644 --- a/java/com/google/gerrit/server/schema/Schema_102.java +++ b/java/com/google/gerrit/server/schema/Schema_102.java @@ -26,7 +26,7 @@ import java.sql.SQLException; import java.util.Set; import java.util.regex.Pattern; -public class Schema_102 extends SchemaVersion { +public class Schema_102 extends ReviewDbSchemaVersion { @Inject Schema_102(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_103.java b/java/com/google/gerrit/server/schema/Schema_103.java index 60a5213cff..1906b66614 100644 --- a/java/com/google/gerrit/server/schema/Schema_103.java +++ b/java/com/google/gerrit/server/schema/Schema_103.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_103 extends SchemaVersion { +public class Schema_103 extends ReviewDbSchemaVersion { @Inject Schema_103(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_104.java b/java/com/google/gerrit/server/schema/Schema_104.java index bebdacaa65..9b4d67c7a7 100644 --- a/java/com/google/gerrit/server/schema/Schema_104.java +++ b/java/com/google/gerrit/server/schema/Schema_104.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_104 extends SchemaVersion { +public class Schema_104 extends ReviewDbSchemaVersion { @Inject Schema_104(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_105.java b/java/com/google/gerrit/server/schema/Schema_105.java index dd5e71a7fd..56e19efa37 100644 --- a/java/com/google/gerrit/server/schema/Schema_105.java +++ b/java/com/google/gerrit/server/schema/Schema_105.java @@ -28,7 +28,7 @@ import java.util.HashMap; import java.util.Map; import java.util.Set; -public class Schema_105 extends SchemaVersion { +public class Schema_105 extends ReviewDbSchemaVersion { private static final String TABLE = "changes"; @Inject diff --git a/java/com/google/gerrit/server/schema/Schema_106.java b/java/com/google/gerrit/server/schema/Schema_106.java index 5bb3669a14..a3f99fced2 100644 --- a/java/com/google/gerrit/server/schema/Schema_106.java +++ b/java/com/google/gerrit/server/schema/Schema_106.java @@ -40,7 +40,7 @@ import org.eclipse.jgit.lib.ObjectId; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_106 extends SchemaVersion { +public class Schema_106 extends ReviewDbSchemaVersion { // we can use multiple threads per CPU as we can expect that threads will be // waiting for IO private static final int THREADS_PER_CPU = 4; diff --git a/java/com/google/gerrit/server/schema/Schema_107.java b/java/com/google/gerrit/server/schema/Schema_107.java index dd8868f816..bef8c6591e 100644 --- a/java/com/google/gerrit/server/schema/Schema_107.java +++ b/java/com/google/gerrit/server/schema/Schema_107.java @@ -21,7 +21,7 @@ import com.google.inject.Provider; import java.sql.SQLException; import java.sql.Statement; -public class Schema_107 extends SchemaVersion { +public class Schema_107 extends ReviewDbSchemaVersion { @Inject Schema_107(Provider prior) { diff --git a/java/com/google/gerrit/server/schema/Schema_108.java b/java/com/google/gerrit/server/schema/Schema_108.java index b37fab3b9e..b2ab0425cf 100644 --- a/java/com/google/gerrit/server/schema/Schema_108.java +++ b/java/com/google/gerrit/server/schema/Schema_108.java @@ -48,7 +48,7 @@ import org.eclipse.jgit.revwalk.RevObject; import org.eclipse.jgit.revwalk.RevSort; import org.eclipse.jgit.revwalk.RevWalk; -public class Schema_108 extends SchemaVersion { +public class Schema_108 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; @Inject diff --git a/java/com/google/gerrit/server/schema/Schema_109.java b/java/com/google/gerrit/server/schema/Schema_109.java index c5a601500f..f5827411f0 100644 --- a/java/com/google/gerrit/server/schema/Schema_109.java +++ b/java/com/google/gerrit/server/schema/Schema_109.java @@ -20,7 +20,7 @@ import com.google.gwtorm.server.StatementExecutor; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_109 extends SchemaVersion { +public class Schema_109 extends ReviewDbSchemaVersion { @Inject Schema_109(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_110.java b/java/com/google/gerrit/server/schema/Schema_110.java index 9e0f112037..6da10f6de7 100644 --- a/java/com/google/gerrit/server/schema/Schema_110.java +++ b/java/com/google/gerrit/server/schema/Schema_110.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_110 extends SchemaVersion { +public class Schema_110 extends ReviewDbSchemaVersion { @Inject Schema_110(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_111.java b/java/com/google/gerrit/server/schema/Schema_111.java index 223fdb602a..7ba48c2c32 100644 --- a/java/com/google/gerrit/server/schema/Schema_111.java +++ b/java/com/google/gerrit/server/schema/Schema_111.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_111 extends SchemaVersion { +public class Schema_111 extends ReviewDbSchemaVersion { @Inject Schema_111(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_112.java b/java/com/google/gerrit/server/schema/Schema_112.java index 3e879bd452..5a764d0075 100644 --- a/java/com/google/gerrit/server/schema/Schema_112.java +++ b/java/com/google/gerrit/server/schema/Schema_112.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_112 extends SchemaVersion { +public class Schema_112 extends ReviewDbSchemaVersion { @Inject Schema_112(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_113.java b/java/com/google/gerrit/server/schema/Schema_113.java index 32d655e63e..2876636232 100644 --- a/java/com/google/gerrit/server/schema/Schema_113.java +++ b/java/com/google/gerrit/server/schema/Schema_113.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_113 extends SchemaVersion { +public class Schema_113 extends ReviewDbSchemaVersion { @Inject Schema_113(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_114.java b/java/com/google/gerrit/server/schema/Schema_114.java index 85c93d2fee..7bee00c8df 100644 --- a/java/com/google/gerrit/server/schema/Schema_114.java +++ b/java/com/google/gerrit/server/schema/Schema_114.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_114 extends SchemaVersion { +public class Schema_114 extends ReviewDbSchemaVersion { @Inject Schema_114(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_115.java b/java/com/google/gerrit/server/schema/Schema_115.java index 70bc9215f4..28cfe22104 100644 --- a/java/com/google/gerrit/server/schema/Schema_115.java +++ b/java/com/google/gerrit/server/schema/Schema_115.java @@ -51,7 +51,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevWalk; -public class Schema_115 extends SchemaVersion { +public class Schema_115 extends ReviewDbSchemaVersion { private final GitRepositoryManager mgr; private final AllUsersName allUsersName; private final PersonIdent serverUser; diff --git a/java/com/google/gerrit/server/schema/Schema_116.java b/java/com/google/gerrit/server/schema/Schema_116.java index 5b018a2953..5174d925c2 100644 --- a/java/com/google/gerrit/server/schema/Schema_116.java +++ b/java/com/google/gerrit/server/schema/Schema_116.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_116 extends SchemaVersion { +public class Schema_116 extends ReviewDbSchemaVersion { @Inject Schema_116(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_117.java b/java/com/google/gerrit/server/schema/Schema_117.java index 35e6c8aaf8..d848bec497 100644 --- a/java/com/google/gerrit/server/schema/Schema_117.java +++ b/java/com/google/gerrit/server/schema/Schema_117.java @@ -24,7 +24,7 @@ import java.sql.SQLException; import java.sql.Statement; import java.util.Set; -public class Schema_117 extends SchemaVersion { +public class Schema_117 extends ReviewDbSchemaVersion { @Inject Schema_117(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_118.java b/java/com/google/gerrit/server/schema/Schema_118.java index 8c2c740b16..e55afda657 100644 --- a/java/com/google/gerrit/server/schema/Schema_118.java +++ b/java/com/google/gerrit/server/schema/Schema_118.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_118 extends SchemaVersion { +public class Schema_118 extends ReviewDbSchemaVersion { @Inject Schema_118(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_119.java b/java/com/google/gerrit/server/schema/Schema_119.java index e5a6405957..9423d81510 100644 --- a/java/com/google/gerrit/server/schema/Schema_119.java +++ b/java/com/google/gerrit/server/schema/Schema_119.java @@ -58,7 +58,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevWalk; -public class Schema_119 extends SchemaVersion { +public class Schema_119 extends ReviewDbSchemaVersion { private static final ImmutableMap LEGACY_DISPLAYNAME_MAP = ImmutableMap.of( "ANON_GIT", ANON_GIT, diff --git a/java/com/google/gerrit/server/schema/Schema_120.java b/java/com/google/gerrit/server/schema/Schema_120.java index 15e34ab5eb..9a1c15ba77 100644 --- a/java/com/google/gerrit/server/schema/Schema_120.java +++ b/java/com/google/gerrit/server/schema/Schema_120.java @@ -39,7 +39,7 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.transport.RefSpec; -public class Schema_120 extends SchemaVersion { +public class Schema_120 extends ReviewDbSchemaVersion { private final GitRepositoryManager mgr; private final ProjectConfig.Factory projectConfigFactory; diff --git a/java/com/google/gerrit/server/schema/Schema_121.java b/java/com/google/gerrit/server/schema/Schema_121.java index 31b42fb53f..bb994ef4fc 100644 --- a/java/com/google/gerrit/server/schema/Schema_121.java +++ b/java/com/google/gerrit/server/schema/Schema_121.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_121 extends SchemaVersion { +public class Schema_121 extends ReviewDbSchemaVersion { @Inject Schema_121(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_122.java b/java/com/google/gerrit/server/schema/Schema_122.java index b5b799d4e6..cce1419071 100644 --- a/java/com/google/gerrit/server/schema/Schema_122.java +++ b/java/com/google/gerrit/server/schema/Schema_122.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_122 extends SchemaVersion { +public class Schema_122 extends ReviewDbSchemaVersion { @Inject Schema_122(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_123.java b/java/com/google/gerrit/server/schema/Schema_123.java index 31cfd5d30d..cd8418871a 100644 --- a/java/com/google/gerrit/server/schema/Schema_123.java +++ b/java/com/google/gerrit/server/schema/Schema_123.java @@ -40,7 +40,7 @@ import org.eclipse.jgit.lib.TextProgressMonitor; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.transport.ReceiveCommand; -public class Schema_123 extends SchemaVersion { +public class Schema_123 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllUsersName allUsersName; diff --git a/java/com/google/gerrit/server/schema/Schema_124.java b/java/com/google/gerrit/server/schema/Schema_124.java index 6164fd149c..7e2fa42c62 100644 --- a/java/com/google/gerrit/server/schema/Schema_124.java +++ b/java/com/google/gerrit/server/schema/Schema_124.java @@ -50,7 +50,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevWalk; -public class Schema_124 extends SchemaVersion { +public class Schema_124 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllUsersName allUsersName; private final PersonIdent serverUser; diff --git a/java/com/google/gerrit/server/schema/Schema_125.java b/java/com/google/gerrit/server/schema/Schema_125.java index 474d7ace1e..cc0d9e7362 100644 --- a/java/com/google/gerrit/server/schema/Schema_125.java +++ b/java/com/google/gerrit/server/schema/Schema_125.java @@ -44,7 +44,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_125 extends SchemaVersion { +public class Schema_125 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Assign default permissions on user branches\n" + "\n" diff --git a/java/com/google/gerrit/server/schema/Schema_126.java b/java/com/google/gerrit/server/schema/Schema_126.java index 23de1691a4..f3004ba2f5 100644 --- a/java/com/google/gerrit/server/schema/Schema_126.java +++ b/java/com/google/gerrit/server/schema/Schema_126.java @@ -38,7 +38,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_126 extends SchemaVersion { +public class Schema_126 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Fix default permissions on user branches"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_127.java b/java/com/google/gerrit/server/schema/Schema_127.java index d246b7593c..8e4175c0ac 100644 --- a/java/com/google/gerrit/server/schema/Schema_127.java +++ b/java/com/google/gerrit/server/schema/Schema_127.java @@ -28,7 +28,7 @@ import java.sql.SQLException; import java.sql.Statement; import org.eclipse.jgit.lib.Config; -public class Schema_127 extends SchemaVersion { +public class Schema_127 extends ReviewDbSchemaVersion { private static final int MAX_BATCH_SIZE = 1000; private final SitePaths sitePaths; diff --git a/java/com/google/gerrit/server/schema/Schema_128.java b/java/com/google/gerrit/server/schema/Schema_128.java index 4f5f9625eb..cd2718b1e2 100644 --- a/java/com/google/gerrit/server/schema/Schema_128.java +++ b/java/com/google/gerrit/server/schema/Schema_128.java @@ -36,7 +36,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_128 extends SchemaVersion { +public class Schema_128 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Add addPatchSet permission to all projects"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_129.java b/java/com/google/gerrit/server/schema/Schema_129.java index 73ce3c3e48..f7cd8c3191 100644 --- a/java/com/google/gerrit/server/schema/Schema_129.java +++ b/java/com/google/gerrit/server/schema/Schema_129.java @@ -22,7 +22,7 @@ import com.google.inject.Provider; import java.sql.SQLException; import java.sql.Statement; -public class Schema_129 extends SchemaVersion { +public class Schema_129 extends ReviewDbSchemaVersion { @Inject Schema_129(Provider prior) { diff --git a/java/com/google/gerrit/server/schema/Schema_130.java b/java/com/google/gerrit/server/schema/Schema_130.java index 66f2177dbb..0c9d79d523 100644 --- a/java/com/google/gerrit/server/schema/Schema_130.java +++ b/java/com/google/gerrit/server/schema/Schema_130.java @@ -32,7 +32,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_130 extends SchemaVersion { +public class Schema_130 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Remove force option from 'Push Annotated Tag' permission\n" + "\n" diff --git a/java/com/google/gerrit/server/schema/Schema_131.java b/java/com/google/gerrit/server/schema/Schema_131.java index e49609693a..b37ae4b298 100644 --- a/java/com/google/gerrit/server/schema/Schema_131.java +++ b/java/com/google/gerrit/server/schema/Schema_131.java @@ -33,7 +33,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_131 extends SchemaVersion { +public class Schema_131 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Rename 'Push Annotated/Signed Tag' permission to 'Create Annotated/Signed Tag'"; diff --git a/java/com/google/gerrit/server/schema/Schema_132.java b/java/com/google/gerrit/server/schema/Schema_132.java index 7c1cde8fe2..72ec590ea9 100644 --- a/java/com/google/gerrit/server/schema/Schema_132.java +++ b/java/com/google/gerrit/server/schema/Schema_132.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_132 extends SchemaVersion { +public class Schema_132 extends ReviewDbSchemaVersion { @Inject Schema_132(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_133.java b/java/com/google/gerrit/server/schema/Schema_133.java index 31d330bc14..29cd6e92ec 100644 --- a/java/com/google/gerrit/server/schema/Schema_133.java +++ b/java/com/google/gerrit/server/schema/Schema_133.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_133 extends SchemaVersion { +public class Schema_133 extends ReviewDbSchemaVersion { @Inject Schema_133(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_134.java b/java/com/google/gerrit/server/schema/Schema_134.java index fa01ff3667..298ac0338e 100644 --- a/java/com/google/gerrit/server/schema/Schema_134.java +++ b/java/com/google/gerrit/server/schema/Schema_134.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_134 extends SchemaVersion { +public class Schema_134 extends ReviewDbSchemaVersion { @Inject Schema_134(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_135.java b/java/com/google/gerrit/server/schema/Schema_135.java index 6281251610..03ef84aecf 100644 --- a/java/com/google/gerrit/server/schema/Schema_135.java +++ b/java/com/google/gerrit/server/schema/Schema_135.java @@ -41,7 +41,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_135 extends SchemaVersion { +public class Schema_135 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Allow admins and project owners to create refs/meta/config"; diff --git a/java/com/google/gerrit/server/schema/Schema_136.java b/java/com/google/gerrit/server/schema/Schema_136.java index a4b1c82db9..11eda7ba79 100644 --- a/java/com/google/gerrit/server/schema/Schema_136.java +++ b/java/com/google/gerrit/server/schema/Schema_136.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_136 extends SchemaVersion { +public class Schema_136 extends ReviewDbSchemaVersion { @Inject Schema_136(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_137.java b/java/com/google/gerrit/server/schema/Schema_137.java index 1b4102fae0..a6ea83b284 100644 --- a/java/com/google/gerrit/server/schema/Schema_137.java +++ b/java/com/google/gerrit/server/schema/Schema_137.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /* change the type of SystemConfig#sitePath to CLOB */ -public class Schema_137 extends SchemaVersion { +public class Schema_137 extends ReviewDbSchemaVersion { @Inject Schema_137(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_138.java b/java/com/google/gerrit/server/schema/Schema_138.java index f824ee135a..61d55ecc5f 100644 --- a/java/com/google/gerrit/server/schema/Schema_138.java +++ b/java/com/google/gerrit/server/schema/Schema_138.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /* Add resolved field to PatchLineComment */ -public class Schema_138 extends SchemaVersion { +public class Schema_138 extends ReviewDbSchemaVersion { @Inject Schema_138(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_139.java b/java/com/google/gerrit/server/schema/Schema_139.java index cdde7e4b22..a234be5fb2 100644 --- a/java/com/google/gerrit/server/schema/Schema_139.java +++ b/java/com/google/gerrit/server/schema/Schema_139.java @@ -54,7 +54,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.revwalk.RevWalk; -public class Schema_139 extends SchemaVersion { +public class Schema_139 extends ReviewDbSchemaVersion { private static final String MSG = "Migrate project watches to git"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_140.java b/java/com/google/gerrit/server/schema/Schema_140.java index bdc5f5525c..f59368ccf1 100644 --- a/java/com/google/gerrit/server/schema/Schema_140.java +++ b/java/com/google/gerrit/server/schema/Schema_140.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Remove ChangeMessage sequence. */ -public class Schema_140 extends SchemaVersion { +public class Schema_140 extends ReviewDbSchemaVersion { @Inject Schema_140(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_141.java b/java/com/google/gerrit/server/schema/Schema_141.java index c081ea99b7..ce1c910e89 100644 --- a/java/com/google/gerrit/server/schema/Schema_141.java +++ b/java/com/google/gerrit/server/schema/Schema_141.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Add status field to account. */ -public class Schema_141 extends SchemaVersion { +public class Schema_141 extends ReviewDbSchemaVersion { @Inject Schema_141(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_142.java b/java/com/google/gerrit/server/schema/Schema_142.java index e67ae2f986..9e06c52e3a 100644 --- a/java/com/google/gerrit/server/schema/Schema_142.java +++ b/java/com/google/gerrit/server/schema/Schema_142.java @@ -29,7 +29,7 @@ import java.sql.ResultSet; import java.sql.SQLException; import java.sql.Statement; -public class Schema_142 extends SchemaVersion { +public class Schema_142 extends ReviewDbSchemaVersion { private static final int MAX_BATCH_SIZE = 1000; @Inject diff --git a/java/com/google/gerrit/server/schema/Schema_143.java b/java/com/google/gerrit/server/schema/Schema_143.java index b190b29b5f..10d108f6ad 100644 --- a/java/com/google/gerrit/server/schema/Schema_143.java +++ b/java/com/google/gerrit/server/schema/Schema_143.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Add isPrivate field to change. */ -public class Schema_143 extends SchemaVersion { +public class Schema_143 extends ReviewDbSchemaVersion { @Inject Schema_143(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_144.java b/java/com/google/gerrit/server/schema/Schema_144.java index bb0cbcafdb..0aad504dc4 100644 --- a/java/com/google/gerrit/server/schema/Schema_144.java +++ b/java/com/google/gerrit/server/schema/Schema_144.java @@ -37,7 +37,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_144 extends SchemaVersion { +public class Schema_144 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Import external IDs from ReviewDb"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_145.java b/java/com/google/gerrit/server/schema/Schema_145.java index 6ccb5d8b7a..1207632168 100644 --- a/java/com/google/gerrit/server/schema/Schema_145.java +++ b/java/com/google/gerrit/server/schema/Schema_145.java @@ -24,7 +24,7 @@ import com.google.inject.Provider; import java.sql.SQLException; /** Create account_external_ids_byEmail index. */ -public class Schema_145 extends SchemaVersion { +public class Schema_145 extends ReviewDbSchemaVersion { @Inject Schema_145(Provider prior) { diff --git a/java/com/google/gerrit/server/schema/Schema_146.java b/java/com/google/gerrit/server/schema/Schema_146.java index 503ed7b0db..2930408384 100644 --- a/java/com/google/gerrit/server/schema/Schema_146.java +++ b/java/com/google/gerrit/server/schema/Schema_146.java @@ -54,7 +54,7 @@ import org.eclipse.jgit.revwalk.RevWalk; * commit with the registration date as commit time is inserted (if such a commit doesn't exist * yet). */ -public class Schema_146 extends SchemaVersion { +public class Schema_146 extends ReviewDbSchemaVersion { private static final String CREATE_ACCOUNT_MSG = "Create Account"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_147.java b/java/com/google/gerrit/server/schema/Schema_147.java index c507fa65a4..f317e9ae61 100644 --- a/java/com/google/gerrit/server/schema/Schema_147.java +++ b/java/com/google/gerrit/server/schema/Schema_147.java @@ -38,7 +38,7 @@ import org.eclipse.jgit.lib.RefUpdate.Result; import org.eclipse.jgit.lib.Repository; /** Delete user branches for which no account exists. */ -public class Schema_147 extends SchemaVersion { +public class Schema_147 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllUsersName allUsersName; diff --git a/java/com/google/gerrit/server/schema/Schema_148.java b/java/com/google/gerrit/server/schema/Schema_148.java index 9433da849f..949dd5a42e 100644 --- a/java/com/google/gerrit/server/schema/Schema_148.java +++ b/java/com/google/gerrit/server/schema/Schema_148.java @@ -33,7 +33,7 @@ import org.eclipse.jgit.lib.Config; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_148 extends SchemaVersion { +public class Schema_148 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Make account IDs of external IDs human-readable"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_149.java b/java/com/google/gerrit/server/schema/Schema_149.java index f1ccaa6bd7..156091ba8e 100644 --- a/java/com/google/gerrit/server/schema/Schema_149.java +++ b/java/com/google/gerrit/server/schema/Schema_149.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Add workInProgress field to change. */ -public class Schema_149 extends SchemaVersion { +public class Schema_149 extends ReviewDbSchemaVersion { @Inject Schema_149(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_150.java b/java/com/google/gerrit/server/schema/Schema_150.java index 456a01ae14..71736f3cc0 100644 --- a/java/com/google/gerrit/server/schema/Schema_150.java +++ b/java/com/google/gerrit/server/schema/Schema_150.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Drop ACCOUNT_EXTERNAL_IDS table. */ -public class Schema_150 extends SchemaVersion { +public class Schema_150 extends ReviewDbSchemaVersion { @Inject Schema_150(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_151.java b/java/com/google/gerrit/server/schema/Schema_151.java index 7d12e5801f..d2440188ff 100644 --- a/java/com/google/gerrit/server/schema/Schema_151.java +++ b/java/com/google/gerrit/server/schema/Schema_151.java @@ -29,7 +29,7 @@ import java.util.List; import java.util.Optional; /** A schema which adds the 'created on' field to groups. */ -public class Schema_151 extends SchemaVersion { +public class Schema_151 extends ReviewDbSchemaVersion { @Inject protected Schema_151(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_152.java b/java/com/google/gerrit/server/schema/Schema_152.java index c5150a0efb..b605e900c4 100644 --- a/java/com/google/gerrit/server/schema/Schema_152.java +++ b/java/com/google/gerrit/server/schema/Schema_152.java @@ -24,7 +24,7 @@ import com.google.inject.Provider; import java.sql.SQLException; /** Drop unused indexes from accounts table. */ -public class Schema_152 extends SchemaVersion { +public class Schema_152 extends ReviewDbSchemaVersion { @Inject Schema_152(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_153.java b/java/com/google/gerrit/server/schema/Schema_153.java index 28aeb171e2..7d1f63ef2b 100644 --- a/java/com/google/gerrit/server/schema/Schema_153.java +++ b/java/com/google/gerrit/server/schema/Schema_153.java @@ -21,7 +21,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Add reviewStarted field to change. */ -public class Schema_153 extends SchemaVersion { +public class Schema_153 extends ReviewDbSchemaVersion { @Inject Schema_153(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_154.java b/java/com/google/gerrit/server/schema/Schema_154.java index fab1693133..8c970109fc 100644 --- a/java/com/google/gerrit/server/schema/Schema_154.java +++ b/java/com/google/gerrit/server/schema/Schema_154.java @@ -47,7 +47,7 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.TextProgressMonitor; /** Migrate accounts to NoteDb. */ -public class Schema_154 extends SchemaVersion { +public class Schema_154 extends ReviewDbSchemaVersion { private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private static final String TABLE = "accounts"; diff --git a/java/com/google/gerrit/server/schema/Schema_155.java b/java/com/google/gerrit/server/schema/Schema_155.java index ec16e062da..812d7a6db8 100644 --- a/java/com/google/gerrit/server/schema/Schema_155.java +++ b/java/com/google/gerrit/server/schema/Schema_155.java @@ -26,7 +26,7 @@ import com.google.inject.Provider; import java.sql.SQLException; /** Create account sequence in NoteDb */ -public class Schema_155 extends SchemaVersion { +public class Schema_155 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllUsersName allUsersName; diff --git a/java/com/google/gerrit/server/schema/Schema_156.java b/java/com/google/gerrit/server/schema/Schema_156.java index fd8fc003ce..237161cf8b 100644 --- a/java/com/google/gerrit/server/schema/Schema_156.java +++ b/java/com/google/gerrit/server/schema/Schema_156.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Add revertOf field to change. */ -public class Schema_156 extends SchemaVersion { +public class Schema_156 extends ReviewDbSchemaVersion { @Inject Schema_156(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_157.java b/java/com/google/gerrit/server/schema/Schema_157.java index f5c5b599b3..20a8c4b740 100644 --- a/java/com/google/gerrit/server/schema/Schema_157.java +++ b/java/com/google/gerrit/server/schema/Schema_157.java @@ -24,7 +24,7 @@ import com.google.inject.Provider; import java.sql.SQLException; /** Drop unused indexes from accounts table. */ -public class Schema_157 extends SchemaVersion { +public class Schema_157 extends ReviewDbSchemaVersion { @Inject Schema_157(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_158.java b/java/com/google/gerrit/server/schema/Schema_158.java index ea85444cfe..3b7d9e8684 100644 --- a/java/com/google/gerrit/server/schema/Schema_158.java +++ b/java/com/google/gerrit/server/schema/Schema_158.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Drop ACCOUNTS table. */ -public class Schema_158 extends SchemaVersion { +public class Schema_158 extends ReviewDbSchemaVersion { @Inject Schema_158(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_159.java b/java/com/google/gerrit/server/schema/Schema_159.java index d6e37d7ae7..ddb57654a6 100644 --- a/java/com/google/gerrit/server/schema/Schema_159.java +++ b/java/com/google/gerrit/server/schema/Schema_159.java @@ -21,7 +21,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Migrate draft changes to private or wip changes. */ -public class Schema_159 extends SchemaVersion { +public class Schema_159 extends ReviewDbSchemaVersion { private enum DraftWorkflowMigrationStrategy { PRIVATE, diff --git a/java/com/google/gerrit/server/schema/Schema_160.java b/java/com/google/gerrit/server/schema/Schema_160.java index eb8b70f3d3..10f5c9d5dc 100644 --- a/java/com/google/gerrit/server/schema/Schema_160.java +++ b/java/com/google/gerrit/server/schema/Schema_160.java @@ -60,7 +60,7 @@ import org.eclipse.jgit.lib.TextProgressMonitor; *

Other menus containing {@code is:draft} in other positions are not affected; this is still a * valid predicate that matches no changes. */ -public class Schema_160 extends SchemaVersion { +public class Schema_160 extends ReviewDbSchemaVersion { @VisibleForTesting static final ImmutableList DEFAULT_DRAFT_ITEMS; static { diff --git a/java/com/google/gerrit/server/schema/Schema_161.java b/java/com/google/gerrit/server/schema/Schema_161.java index 3077720ef0..4627abe55b 100644 --- a/java/com/google/gerrit/server/schema/Schema_161.java +++ b/java/com/google/gerrit/server/schema/Schema_161.java @@ -39,7 +39,7 @@ import org.eclipse.jgit.lib.TextProgressMonitor; import org.eclipse.jgit.revwalk.RevWalk; import org.eclipse.jgit.transport.ReceiveCommand; -public class Schema_161 extends SchemaVersion { +public class Schema_161 extends ReviewDbSchemaVersion { private static final String MUTE_LABEL = "mute"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_162.java b/java/com/google/gerrit/server/schema/Schema_162.java index 85220c7fca..3d3a1920fd 100644 --- a/java/com/google/gerrit/server/schema/Schema_162.java +++ b/java/com/google/gerrit/server/schema/Schema_162.java @@ -30,7 +30,7 @@ import org.eclipse.jgit.errors.ConfigInvalidException; import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; -public class Schema_162 extends SchemaVersion { +public class Schema_162 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllProjectsName allProjectsName; private final AllUsersName allUsersName; diff --git a/java/com/google/gerrit/server/schema/Schema_163.java b/java/com/google/gerrit/server/schema/Schema_163.java index ae057744db..9eb5d5eb55 100644 --- a/java/com/google/gerrit/server/schema/Schema_163.java +++ b/java/com/google/gerrit/server/schema/Schema_163.java @@ -26,7 +26,7 @@ import com.google.inject.Provider; import java.sql.SQLException; /** Create group sequence in NoteDb */ -public class Schema_163 extends SchemaVersion { +public class Schema_163 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllUsersName allUsersName; diff --git a/java/com/google/gerrit/server/schema/Schema_164.java b/java/com/google/gerrit/server/schema/Schema_164.java index 818f84c91e..b6c3118847 100644 --- a/java/com/google/gerrit/server/schema/Schema_164.java +++ b/java/com/google/gerrit/server/schema/Schema_164.java @@ -38,7 +38,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; /** Grant read on group branches */ -public class Schema_164 extends SchemaVersion { +public class Schema_164 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Grant read permissions on group branches"; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_165.java b/java/com/google/gerrit/server/schema/Schema_165.java index b4f95231e6..d80c77073b 100644 --- a/java/com/google/gerrit/server/schema/Schema_165.java +++ b/java/com/google/gerrit/server/schema/Schema_165.java @@ -41,7 +41,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; /** Make default Label-Code-Review permission on user branches exclusive. */ -public class Schema_165 extends SchemaVersion { +public class Schema_165 extends ReviewDbSchemaVersion { private static final String COMMIT_MSG = "Make default Label-Code-Review permission on user branches exclusive"; diff --git a/java/com/google/gerrit/server/schema/Schema_166.java b/java/com/google/gerrit/server/schema/Schema_166.java index aa6f4e68b0..901df56f8a 100644 --- a/java/com/google/gerrit/server/schema/Schema_166.java +++ b/java/com/google/gerrit/server/schema/Schema_166.java @@ -28,7 +28,7 @@ import org.eclipse.jgit.lib.RefUpdate; import org.eclipse.jgit.lib.Repository; /** Set HEAD for All-Users to refs/meta/config. */ -public class Schema_166 extends SchemaVersion { +public class Schema_166 extends ReviewDbSchemaVersion { private final GitRepositoryManager repoManager; private final AllUsersName allUsersName; diff --git a/java/com/google/gerrit/server/schema/Schema_167.java b/java/com/google/gerrit/server/schema/Schema_167.java index a5066cc988..15fcddd333 100644 --- a/java/com/google/gerrit/server/schema/Schema_167.java +++ b/java/com/google/gerrit/server/schema/Schema_167.java @@ -60,7 +60,7 @@ import org.eclipse.jgit.lib.PersonIdent; import org.eclipse.jgit.lib.Repository; /** Migrate groups from ReviewDb to NoteDb. */ -public class Schema_167 extends SchemaVersion { +public class Schema_167 extends ReviewDbSchemaVersion { private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_168.java b/java/com/google/gerrit/server/schema/Schema_168.java index 3ea84688f2..fff4049707 100644 --- a/java/com/google/gerrit/server/schema/Schema_168.java +++ b/java/com/google/gerrit/server/schema/Schema_168.java @@ -18,7 +18,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; /** Drop group tables. */ -public class Schema_168 extends SchemaVersion { +public class Schema_168 extends ReviewDbSchemaVersion { @Inject Schema_168(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_169.java b/java/com/google/gerrit/server/schema/Schema_169.java index 2779d47cca..11601e479a 100644 --- a/java/com/google/gerrit/server/schema/Schema_169.java +++ b/java/com/google/gerrit/server/schema/Schema_169.java @@ -35,7 +35,7 @@ import org.eclipse.jgit.lib.Repository; import org.eclipse.jgit.lib.TextProgressMonitor; /** Migrate NoteDb inline comments to JSON format. */ -public class Schema_169 extends SchemaVersion { +public class Schema_169 extends ReviewDbSchemaVersion { private static final FluentLogger logger = FluentLogger.forEnclosingClass(); private final CommentJsonMigrator migrator; private final GitRepositoryManager repoManager; diff --git a/java/com/google/gerrit/server/schema/Schema_83.java b/java/com/google/gerrit/server/schema/Schema_83.java index decbfb1175..95b7e6f0ef 100644 --- a/java/com/google/gerrit/server/schema/Schema_83.java +++ b/java/com/google/gerrit/server/schema/Schema_83.java @@ -18,14 +18,14 @@ import com.google.inject.Inject; import com.google.inject.Provider; import com.google.inject.ProvisionException; -public class Schema_83 extends SchemaVersion { +public class Schema_83 extends ReviewDbSchemaVersion { @Inject Schema_83() { super( - new Provider() { + new Provider() { @Override - public SchemaVersion get() { + public ReviewDbSchemaVersion get() { throw new ProvisionException("Upgrade first to 2.8 or 2.9"); } }); diff --git a/java/com/google/gerrit/server/schema/Schema_84.java b/java/com/google/gerrit/server/schema/Schema_84.java index c96f650618..415b2e37e8 100644 --- a/java/com/google/gerrit/server/schema/Schema_84.java +++ b/java/com/google/gerrit/server/schema/Schema_84.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_84 extends SchemaVersion { +public class Schema_84 extends ReviewDbSchemaVersion { @Inject Schema_84(Provider prior) { diff --git a/java/com/google/gerrit/server/schema/Schema_85.java b/java/com/google/gerrit/server/schema/Schema_85.java index e24e67cbc7..ee8fbdba91 100644 --- a/java/com/google/gerrit/server/schema/Schema_85.java +++ b/java/com/google/gerrit/server/schema/Schema_85.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_85 extends SchemaVersion { +public class Schema_85 extends ReviewDbSchemaVersion { @Inject Schema_85(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_86.java b/java/com/google/gerrit/server/schema/Schema_86.java index d758189a66..e4683458d6 100644 --- a/java/com/google/gerrit/server/schema/Schema_86.java +++ b/java/com/google/gerrit/server/schema/Schema_86.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_86 extends SchemaVersion { +public class Schema_86 extends ReviewDbSchemaVersion { @Inject Schema_86(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_87.java b/java/com/google/gerrit/server/schema/Schema_87.java index 8a3ea0860e..fe2156568c 100644 --- a/java/com/google/gerrit/server/schema/Schema_87.java +++ b/java/com/google/gerrit/server/schema/Schema_87.java @@ -28,7 +28,7 @@ import java.util.HashSet; import java.util.Optional; import java.util.Set; -public class Schema_87 extends SchemaVersion { +public class Schema_87 extends ReviewDbSchemaVersion { @Inject Schema_87(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_88.java b/java/com/google/gerrit/server/schema/Schema_88.java index 0a7f14c994..d5e9994a18 100644 --- a/java/com/google/gerrit/server/schema/Schema_88.java +++ b/java/com/google/gerrit/server/schema/Schema_88.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_88 extends SchemaVersion { +public class Schema_88 extends ReviewDbSchemaVersion { @Inject Schema_88(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_89.java b/java/com/google/gerrit/server/schema/Schema_89.java index de84993214..3d352da905 100644 --- a/java/com/google/gerrit/server/schema/Schema_89.java +++ b/java/com/google/gerrit/server/schema/Schema_89.java @@ -23,7 +23,7 @@ import com.google.inject.Inject; import com.google.inject.Provider; import java.sql.SQLException; -public class Schema_89 extends SchemaVersion { +public class Schema_89 extends ReviewDbSchemaVersion { @Inject Schema_89(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_90.java b/java/com/google/gerrit/server/schema/Schema_90.java index d8f02ae147..3831f33273 100644 --- a/java/com/google/gerrit/server/schema/Schema_90.java +++ b/java/com/google/gerrit/server/schema/Schema_90.java @@ -20,7 +20,7 @@ import com.google.inject.Provider; import java.sql.SQLException; import java.sql.Statement; -public class Schema_90 extends SchemaVersion { +public class Schema_90 extends ReviewDbSchemaVersion { @Inject Schema_90(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_91.java b/java/com/google/gerrit/server/schema/Schema_91.java index 173793e711..6dd2d588c5 100644 --- a/java/com/google/gerrit/server/schema/Schema_91.java +++ b/java/com/google/gerrit/server/schema/Schema_91.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_91 extends SchemaVersion { +public class Schema_91 extends ReviewDbSchemaVersion { @Inject Schema_91(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_92.java b/java/com/google/gerrit/server/schema/Schema_92.java index 5f5c141498..9af33c00ae 100644 --- a/java/com/google/gerrit/server/schema/Schema_92.java +++ b/java/com/google/gerrit/server/schema/Schema_92.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_92 extends SchemaVersion { +public class Schema_92 extends ReviewDbSchemaVersion { @Inject Schema_92(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_93.java b/java/com/google/gerrit/server/schema/Schema_93.java index 3132aa4e4f..e9a6691659 100644 --- a/java/com/google/gerrit/server/schema/Schema_93.java +++ b/java/com/google/gerrit/server/schema/Schema_93.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_93 extends SchemaVersion { +public class Schema_93 extends ReviewDbSchemaVersion { @Inject Schema_93(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_94.java b/java/com/google/gerrit/server/schema/Schema_94.java index d4a189fae2..15516509fb 100644 --- a/java/com/google/gerrit/server/schema/Schema_94.java +++ b/java/com/google/gerrit/server/schema/Schema_94.java @@ -20,7 +20,7 @@ import com.google.inject.Provider; import java.sql.SQLException; import java.sql.Statement; -public class Schema_94 extends SchemaVersion { +public class Schema_94 extends ReviewDbSchemaVersion { @Inject Schema_94(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_95.java b/java/com/google/gerrit/server/schema/Schema_95.java index 0ce0294dac..19dfa97dcb 100644 --- a/java/com/google/gerrit/server/schema/Schema_95.java +++ b/java/com/google/gerrit/server/schema/Schema_95.java @@ -22,7 +22,7 @@ import java.io.IOException; import java.sql.SQLException; import org.eclipse.jgit.errors.ConfigInvalidException; -public class Schema_95 extends SchemaVersion { +public class Schema_95 extends ReviewDbSchemaVersion { private final AllUsersCreator allUsersCreator; @Inject diff --git a/java/com/google/gerrit/server/schema/Schema_96.java b/java/com/google/gerrit/server/schema/Schema_96.java index bf1921386e..2eb9a87606 100644 --- a/java/com/google/gerrit/server/schema/Schema_96.java +++ b/java/com/google/gerrit/server/schema/Schema_96.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_96 extends SchemaVersion { +public class Schema_96 extends ReviewDbSchemaVersion { @Inject Schema_96(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_97.java b/java/com/google/gerrit/server/schema/Schema_97.java index 06703778a5..98f548e99c 100644 --- a/java/com/google/gerrit/server/schema/Schema_97.java +++ b/java/com/google/gerrit/server/schema/Schema_97.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_97 extends SchemaVersion { +public class Schema_97 extends ReviewDbSchemaVersion { @Inject Schema_97(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_98.java b/java/com/google/gerrit/server/schema/Schema_98.java index eec3c9f52e..8a7498f48e 100644 --- a/java/com/google/gerrit/server/schema/Schema_98.java +++ b/java/com/google/gerrit/server/schema/Schema_98.java @@ -20,7 +20,7 @@ import com.google.inject.Provider; import java.sql.SQLException; import java.sql.Statement; -public class Schema_98 extends SchemaVersion { +public class Schema_98 extends ReviewDbSchemaVersion { @Inject Schema_98(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/server/schema/Schema_99.java b/java/com/google/gerrit/server/schema/Schema_99.java index b7fab7f659..ca3a9598a4 100644 --- a/java/com/google/gerrit/server/schema/Schema_99.java +++ b/java/com/google/gerrit/server/schema/Schema_99.java @@ -17,7 +17,7 @@ package com.google.gerrit.server.schema; import com.google.inject.Inject; import com.google.inject.Provider; -public class Schema_99 extends SchemaVersion { +public class Schema_99 extends ReviewDbSchemaVersion { @Inject Schema_99(Provider prior) { super(prior); diff --git a/java/com/google/gerrit/testing/InMemoryDatabase.java b/java/com/google/gerrit/testing/InMemoryDatabase.java index a3d7c17b86..c9d6bd653b 100644 --- a/java/com/google/gerrit/testing/InMemoryDatabase.java +++ b/java/com/google/gerrit/testing/InMemoryDatabase.java @@ -23,8 +23,8 @@ import com.google.gerrit.reviewdb.client.CurrentSchemaVersion; import com.google.gerrit.reviewdb.client.SystemConfig; import com.google.gerrit.reviewdb.server.ReviewDb; import com.google.gerrit.server.index.IndexModule; -import com.google.gerrit.server.schema.SchemaCreator; -import com.google.gerrit.server.schema.SchemaVersion; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaVersion; import com.google.gwtorm.jdbc.Database; import com.google.gwtorm.jdbc.SimpleDataSource; import com.google.gwtorm.server.OrmException; @@ -62,7 +62,7 @@ public class InMemoryDatabase implements SchemaFactory { } } - private final SchemaCreator schemaCreator; + private final ReviewDbSchemaCreator schemaCreator; private final Instance dbInstance; private boolean created; @@ -86,7 +86,7 @@ public class InMemoryDatabase implements SchemaFactory { } } }); - this.schemaCreator = childInjector.getInstance(SchemaCreator.class); + this.schemaCreator = childInjector.getInstance(ReviewDbSchemaCreator.class); Instance dbInstanceFromInjector = childInjector.getInstance(Instance.class); if (dbInstanceFromInjector != null) { this.dbInstance = dbInstanceFromInjector; @@ -96,7 +96,7 @@ public class InMemoryDatabase implements SchemaFactory { } } - InMemoryDatabase(SchemaCreator schemaCreator) throws OrmException { + InMemoryDatabase(ReviewDbSchemaCreator schemaCreator) throws OrmException { this.schemaCreator = schemaCreator; this.dbInstance = new Instance(); } @@ -140,7 +140,7 @@ public class InMemoryDatabase implements SchemaFactory { } public void assertSchemaVersion() throws OrmException { - assertThat(getSchemaVersion().versionNbr).isEqualTo(SchemaVersion.getBinaryVersion()); + assertThat(getSchemaVersion().versionNbr).isEqualTo(ReviewDbSchemaVersion.getBinaryVersion()); } public static class Instance { diff --git a/java/com/google/gerrit/testing/InMemoryModule.java b/java/com/google/gerrit/testing/InMemoryModule.java index 24ff82cc48..fc1781628c 100644 --- a/java/com/google/gerrit/testing/InMemoryModule.java +++ b/java/com/google/gerrit/testing/InMemoryModule.java @@ -85,7 +85,7 @@ import com.google.gerrit.server.schema.DataSourceType; import com.google.gerrit.server.schema.InMemoryAccountPatchReviewStore; import com.google.gerrit.server.schema.NotesMigrationSchemaFactory; import com.google.gerrit.server.schema.ReviewDbFactory; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.securestore.DefaultSecureStore; import com.google.gerrit.server.securestore.SecureStore; import com.google.gerrit.server.ssh.NoSshKeyCache; @@ -303,7 +303,7 @@ public class InMemoryModule extends FactoryModule { @Provides @Singleton - InMemoryDatabase getInMemoryDatabase(SchemaCreator schemaCreator) throws OrmException { + InMemoryDatabase getInMemoryDatabase(ReviewDbSchemaCreator schemaCreator) throws OrmException { return new InMemoryDatabase(schemaCreator); } diff --git a/java/com/google/gerrit/testing/InMemoryTestEnvironment.java b/java/com/google/gerrit/testing/InMemoryTestEnvironment.java index cebd139612..02be071844 100644 --- a/java/com/google/gerrit/testing/InMemoryTestEnvironment.java +++ b/java/com/google/gerrit/testing/InMemoryTestEnvironment.java @@ -21,7 +21,7 @@ import com.google.gerrit.server.CurrentUser; import com.google.gerrit.server.IdentifiedUser; import com.google.gerrit.server.account.AccountManager; import com.google.gerrit.server.account.AuthRequest; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; import com.google.gwtorm.server.SchemaFactory; @@ -50,7 +50,7 @@ public final class InMemoryTestEnvironment implements MethodRule { @Inject private AccountManager accountManager; @Inject private IdentifiedUser.GenericFactory userFactory; @Inject private SchemaFactory schemaFactory; - @Inject private SchemaCreator schemaCreator; + @Inject private ReviewDbSchemaCreator schemaCreator; @Inject private ThreadLocalRequestContext requestContext; // Only for use in setting up/tearing down injector. @Inject private InMemoryDatabase inMemoryDatabase; diff --git a/javatests/com/google/gerrit/gpg/GerritPublicKeyCheckerTest.java b/javatests/com/google/gerrit/gpg/GerritPublicKeyCheckerTest.java index 685f42de42..689d786338 100644 --- a/javatests/com/google/gerrit/gpg/GerritPublicKeyCheckerTest.java +++ b/javatests/com/google/gerrit/gpg/GerritPublicKeyCheckerTest.java @@ -41,7 +41,7 @@ import com.google.gerrit.server.account.AccountManager; import com.google.gerrit.server.account.AccountsUpdate; import com.google.gerrit.server.account.AuthRequest; import com.google.gerrit.server.account.externalids.ExternalId; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; import com.google.gerrit.testing.InMemoryDatabase; @@ -80,7 +80,7 @@ public class GerritPublicKeyCheckerTest { @Inject private InMemoryDatabase schemaFactory; - @Inject private SchemaCreator schemaCreator; + @Inject private ReviewDbSchemaCreator schemaCreator; @Inject private ThreadLocalRequestContext requestContext; diff --git a/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java b/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java index eb6f189dc6..982bd14ae1 100644 --- a/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java +++ b/javatests/com/google/gerrit/server/change/LabelNormalizerTest.java @@ -44,7 +44,7 @@ import com.google.gerrit.server.git.meta.MetaDataUpdate; import com.google.gerrit.server.notedb.ChangeNotes; import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.project.ProjectConfig; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; import com.google.gerrit.server.util.time.TimeUtil; @@ -71,7 +71,7 @@ public class LabelNormalizerTest { @Inject private LabelNormalizer norm; @Inject private MetaDataUpdate.User metaDataUpdateFactory; @Inject private ProjectCache projectCache; - @Inject private SchemaCreator schemaCreator; + @Inject private ReviewDbSchemaCreator schemaCreator; @Inject protected ThreadLocalRequestContext requestContext; @Inject private ChangeNotes.Factory changeNotesFactory; @Inject private ProjectConfig.Factory projectConfigFactory; diff --git a/javatests/com/google/gerrit/server/permissions/RefControlTest.java b/javatests/com/google/gerrit/server/permissions/RefControlTest.java index 1d2d04c354..38e9578bfa 100644 --- a/javatests/com/google/gerrit/server/permissions/RefControlTest.java +++ b/javatests/com/google/gerrit/server/permissions/RefControlTest.java @@ -63,7 +63,7 @@ import com.google.gerrit.server.project.ProjectConfig; import com.google.gerrit.server.project.ProjectState; import com.google.gerrit.server.project.RefPattern; import com.google.gerrit.server.project.testing.Util; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.RequestContext; import com.google.gerrit.server.util.ThreadLocalRequestContext; import com.google.gerrit.testing.InMemoryDatabase; @@ -199,7 +199,7 @@ public class RefControlTest { @Inject private PermissionBackend permissionBackend; @Inject private CapabilityCollection.Factory capabilityCollectionFactory; - @Inject private SchemaCreator schemaCreator; + @Inject private ReviewDbSchemaCreator schemaCreator; @Inject private SingleVersionListener singleVersionListener; @Inject private InMemoryDatabase schemaFactory; @Inject private ThreadLocalRequestContext requestContext; diff --git a/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java b/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java index 9d01405244..26cc3f8fb0 100644 --- a/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java +++ b/javatests/com/google/gerrit/server/query/account/AbstractQueryAccountsTest.java @@ -74,7 +74,7 @@ import com.google.gerrit.server.index.account.AccountField; import com.google.gerrit.server.index.account.AccountIndex; import com.google.gerrit.server.index.account.AccountIndexCollection; import com.google.gerrit.server.index.account.AccountIndexer; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.ManualRequestContext; import com.google.gerrit.server.util.OneOffRequestContext; import com.google.gerrit.server.util.RequestContext; @@ -120,7 +120,7 @@ public abstract class AbstractQueryAccountsTest extends GerritServerTests { @Inject protected InMemoryDatabase schemaFactory; - @Inject protected SchemaCreator schemaCreator; + @Inject protected ReviewDbSchemaCreator schemaCreator; @Inject protected ThreadLocalRequestContext requestContext; diff --git a/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java b/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java index f362e5a73b..de2234e084 100644 --- a/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java +++ b/javatests/com/google/gerrit/server/query/change/AbstractQueryChangesTest.java @@ -109,7 +109,7 @@ import com.google.gerrit.server.notedb.NoteDbChangeState; import com.google.gerrit.server.notedb.NoteDbChangeState.PrimaryStorage; import com.google.gerrit.server.project.ProjectCache; import com.google.gerrit.server.project.ProjectConfig; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.update.BatchUpdate; import com.google.gerrit.server.util.ManualRequestContext; import com.google.gerrit.server.util.OneOffRequestContext; @@ -177,7 +177,7 @@ public abstract class AbstractQueryChangesTest extends GerritServerTests { @Inject protected PatchSetUtil psUtil; @Inject protected ChangeNotes.Factory changeNotesFactory; @Inject protected Provider queryProcessorProvider; - @Inject protected SchemaCreator schemaCreator; + @Inject protected ReviewDbSchemaCreator schemaCreator; @Inject protected SchemaFactory schemaFactory; @Inject protected Sequences seq; @Inject protected ThreadLocalRequestContext requestContext; diff --git a/javatests/com/google/gerrit/server/query/group/AbstractQueryGroupsTest.java b/javatests/com/google/gerrit/server/query/group/AbstractQueryGroupsTest.java index 750813ad7f..7e4a0a460d 100644 --- a/javatests/com/google/gerrit/server/query/group/AbstractQueryGroupsTest.java +++ b/javatests/com/google/gerrit/server/query/group/AbstractQueryGroupsTest.java @@ -52,7 +52,7 @@ import com.google.gerrit.server.group.db.InternalGroupUpdate; import com.google.gerrit.server.index.group.GroupField; import com.google.gerrit.server.index.group.GroupIndex; import com.google.gerrit.server.index.group.GroupIndexCollection; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.ManualRequestContext; import com.google.gerrit.server.util.OneOffRequestContext; import com.google.gerrit.server.util.RequestContext; @@ -91,7 +91,7 @@ public abstract class AbstractQueryGroupsTest extends GerritServerTests { @Inject protected InMemoryDatabase schemaFactory; - @Inject protected SchemaCreator schemaCreator; + @Inject protected ReviewDbSchemaCreator schemaCreator; @Inject protected ThreadLocalRequestContext requestContext; diff --git a/javatests/com/google/gerrit/server/query/project/AbstractQueryProjectsTest.java b/javatests/com/google/gerrit/server/query/project/AbstractQueryProjectsTest.java index 420c323366..3219dfd679 100644 --- a/javatests/com/google/gerrit/server/query/project/AbstractQueryProjectsTest.java +++ b/javatests/com/google/gerrit/server/query/project/AbstractQueryProjectsTest.java @@ -50,7 +50,7 @@ import com.google.gerrit.server.account.AccountsUpdate; import com.google.gerrit.server.account.AuthRequest; import com.google.gerrit.server.config.AllProjectsName; import com.google.gerrit.server.group.SystemGroupBackend; -import com.google.gerrit.server.schema.SchemaCreator; +import com.google.gerrit.server.schema.ReviewDbSchemaCreator; import com.google.gerrit.server.util.ManualRequestContext; import com.google.gerrit.server.util.OneOffRequestContext; import com.google.gerrit.server.util.RequestContext; @@ -88,7 +88,7 @@ public abstract class AbstractQueryProjectsTest extends GerritServerTests { @Inject protected InMemoryDatabase schemaFactory; - @Inject protected SchemaCreator schemaCreator; + @Inject protected ReviewDbSchemaCreator schemaCreator; @Inject protected ThreadLocalRequestContext requestContext; diff --git a/javatests/com/google/gerrit/server/schema/SchemaCreatorTest.java b/javatests/com/google/gerrit/server/schema/ReviewDbSchemaCreatorTest.java similarity index 99% rename from javatests/com/google/gerrit/server/schema/SchemaCreatorTest.java rename to javatests/com/google/gerrit/server/schema/ReviewDbSchemaCreatorTest.java index 9cb9333db5..c2bf4229d7 100644 --- a/javatests/com/google/gerrit/server/schema/SchemaCreatorTest.java +++ b/javatests/com/google/gerrit/server/schema/ReviewDbSchemaCreatorTest.java @@ -43,7 +43,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -public class SchemaCreatorTest { +public class ReviewDbSchemaCreatorTest { @Inject private AllProjectsName allProjects; @Inject private GitRepositoryManager repoManager; diff --git a/javatests/com/google/gerrit/server/schema/SchemaUpdaterTest.java b/javatests/com/google/gerrit/server/schema/ReviewDbSchemaUpdaterTest.java similarity index 95% rename from javatests/com/google/gerrit/server/schema/SchemaUpdaterTest.java rename to javatests/com/google/gerrit/server/schema/ReviewDbSchemaUpdaterTest.java index c4844b1817..c0684d15d9 100644 --- a/javatests/com/google/gerrit/server/schema/SchemaUpdaterTest.java +++ b/javatests/com/google/gerrit/server/schema/ReviewDbSchemaUpdaterTest.java @@ -56,7 +56,7 @@ import org.junit.After; import org.junit.Before; import org.junit.Test; -public class SchemaUpdaterTest { +public class ReviewDbSchemaUpdaterTest { private LifecycleManager lifecycle; private InMemoryDatabase db; @@ -81,7 +81,7 @@ public class SchemaUpdaterTest { final Path site = Paths.get(UUID.randomUUID().toString()); final SitePaths paths = new SitePaths(site); - SchemaUpdater u = + ReviewDbSchemaUpdater u = Guice.createInjector( new FactoryModule() { @Override @@ -126,9 +126,11 @@ public class SchemaUpdaterTest { bind(MetricMaker.class).to(DisabledMetricMaker.class); } }) - .getInstance(SchemaUpdater.class); + .getInstance(ReviewDbSchemaUpdater.class); - for (SchemaVersion s = u.getLatestSchemaVersion(); s.getVersionNbr() > 1; s = s.getPrior()) { + for (ReviewDbSchemaVersion s = u.getLatestSchemaVersion(); + s.getVersionNbr() > 1; + s = s.getPrior()) { try { assertThat(s.getPrior().getVersionNbr()) .named( diff --git a/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInNoteDbTest.java b/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInNoteDbTest.java index 57689b3520..f17550e3e4 100644 --- a/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInNoteDbTest.java +++ b/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInNoteDbTest.java @@ -206,7 +206,7 @@ public class Schema_166_to_167_WithGroupsInNoteDbTest { } } - private void executeSchemaMigration(SchemaVersion schema) throws Exception { + private void executeSchemaMigration(ReviewDbSchemaVersion schema) throws Exception { schema.migrateData(db, new TestUpdateUI()); } diff --git a/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInReviewDbTest.java b/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInReviewDbTest.java index 78fef3932c..890ae32cd9 100644 --- a/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInReviewDbTest.java +++ b/javatests/com/google/gerrit/server/schema/Schema_166_to_167_WithGroupsInReviewDbTest.java @@ -920,7 +920,7 @@ public class Schema_166_to_167_WithGroupsInReviewDbTest { } } - private void executeSchemaMigration(SchemaVersion schema, AccountGroup... groupsToVerify) + private void executeSchemaMigration(ReviewDbSchemaVersion schema, AccountGroup... groupsToVerify) throws Exception { executeSchemaMigration( schema, @@ -929,7 +929,7 @@ public class Schema_166_to_167_WithGroupsInReviewDbTest { .toArray(AccountGroup.UUID[]::new)); } - private void executeSchemaMigration(SchemaVersion schema, GroupInfo... groupsToVerify) + private void executeSchemaMigration(ReviewDbSchemaVersion schema, GroupInfo... groupsToVerify) throws Exception { executeSchemaMigration( schema, @@ -938,8 +938,8 @@ public class Schema_166_to_167_WithGroupsInReviewDbTest { .toArray(AccountGroup.UUID[]::new)); } - private void executeSchemaMigration(SchemaVersion schema, AccountGroup.UUID... groupsToVerify) - throws Exception { + private void executeSchemaMigration( + ReviewDbSchemaVersion schema, AccountGroup.UUID... groupsToVerify) throws Exception { List reviewDbBundles = new ArrayList<>(); for (AccountGroup.UUID groupUuid : groupsToVerify) { reviewDbBundles.add(GroupBundle.Factory.fromReviewDb(db, groupUuid));