private boolean shouldWriteVersion() {
    if (myVersion != CURRENT_VERSION) return false;

    if (myOldVersion == myVersion) return true;

    if (myOldVersion == 0 && !isFirstMigrationPreserved()) return true;
    return false;
  }
private boolean shouldWriteVersion()