QueryShell: Use SchemaFactory for underlying ReviewDb
This command is specifically for accessing the traditional SQL database, so it should be able to bypass the NoteDb-related wrappers. This potentially allows admins to edit change data in a way that messes with the migration process, or that simply won't be reflected in a NoteDb-only site, but that's an inherent risk of hand-editing the database. Bug: Issue 7467 Change-Id: I871c6f32b1c7df7f5dbfb36fc2f229913759406f
This commit is contained in:
@@ -20,6 +20,7 @@ import com.google.gerrit.common.TimeUtil;
|
||||
import com.google.gerrit.common.Version;
|
||||
import com.google.gerrit.reviewdb.server.ReviewDb;
|
||||
import com.google.gerrit.reviewdb.server.ReviewDbUtil;
|
||||
import com.google.gerrit.server.schema.ReviewDbFactory;
|
||||
import com.google.gson.JsonArray;
|
||||
import com.google.gson.JsonObject;
|
||||
import com.google.gwtorm.jdbc.JdbcSchema;
|
||||
@@ -68,7 +69,7 @@ public class QueryShell {
|
||||
|
||||
@Inject
|
||||
QueryShell(
|
||||
final SchemaFactory<ReviewDb> dbFactory,
|
||||
@ReviewDbFactory final SchemaFactory<ReviewDb> dbFactory,
|
||||
@Assisted final InputStream in,
|
||||
@Assisted final OutputStream out) {
|
||||
this.dbFactory = dbFactory;
|
||||
|
||||
Reference in New Issue
Block a user