NoteDbMigrator: Refuse to rebuild if NoteDb writes are disabled

Change-Id: I867d3488a30687b4394b4dea9977b51e34d80e01
This commit is contained in:
Dave Borowitz
2017-06-20 11:13:52 -04:00
parent 4cac85127d
commit 54db5be7b7

View File

@@ -384,6 +384,9 @@ public class NoteDbMigrator implements AutoCloseable {
}
public void rebuild() throws MigrationException, OrmException {
checkState(
globalNotesMigration.commitChangeWrites(),
"cannot rebuild without noteDb.changes.write=true");
boolean ok;
Stopwatch sw = Stopwatch.createStarted();
log.info("Rebuilding changes in NoteDb");