public void start() {
try {
boolean upgraded = false;
Version v = DatabaseManager.getVersion();
LogForm lf = null;
if (v.isOlder(new Version(3, 9, 2, 0))) {
lf = new LogForm();
DcSwingUtilities.displayMessage(
"Data Crow will perform a non critical upgrade. This process will take a couple of minutes.");
upgraded = fillUIPersistFields();
}
if (v.isOlder(new Version(3, 9, 6, 0))) {
lf = new LogForm();
DcSwingUtilities.displayMessage(
"Data Crow will perform a non critical upgrade to clear unwanted characters from languages, countries and other items.");
upgraded = cleanupNames();
}
if (v.isOlder(new Version(3, 9, 8, 0))) {
lf = new LogForm();
DcSwingUtilities.displayMessage(
"- Ghost references will be removed. \n " +
"- The names of all persons (actors, authors, etc) will be formatted to read \"Lastname, Firstname\".\n" +
"- The sort index for persons will be recalculated.");
upgraded = cleanupReferences();
upgraded = reverseNames();
upgraded = fillUIPersistFieldsPersons();
}
if (v.isOlder(new Version(3, 9, 9, 0))) {
lf = new LogForm();
DcSwingUtilities.displayMessage(
"- Names of authors will be corrected. \n" +
"- Pictures of previously deleted items will now be removed. This is a non crucial system task which can take a few minutes.");
upgraded = cleanupPictures();
upgraded = reverseAuthorNames();
}
if (upgraded) {
lf.close();
DcSwingUtilities.displayMessage(
"The upgrade was successful. Data Crow will now continue.");
DataCrow.showSplashScreen(true);
}