Changeset 5621 for trunk/src/install/net


Ignore:
Timestamp:
May 3, 2011, 1:21:06 PM (11 years ago)
Author:
Nicklas Nordborg
Message:

References #1591: Upgrade script for BASE 2.17 --> 3.0

Removed unused queries from predefined query xml files. Fixes update for:

  • jarPath --> jarFile properties of PluginDefinition, PluginTypes and JobAgentSettings.
  • affy_chip column.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/install/net/sf/basedb/install/InitDB.java

    r4889 r5621  
    3434import net.sf.basedb.core.ProgressReporter;
    3535import net.sf.basedb.core.Update;
     36import net.sf.basedb.core.Version;
    3637import net.sf.basedb.util.ConsoleProgressReporter;
    3738import net.sf.basedb.util.ChainedProgressReporter;
     
    6970        progress.setRange(0, 30);
    7071        showDbInfo(progress);
    71         Install.createTables(update, progress);
    72         progress.setRange(35, 70);
    73         Update.adjustExistingItems(update, progress, rootLogin, rootPassword);
     72        int schemaVersion = Install.createTables(update, progress);
     73        progress.setRange(30, 50);
     74        if (update)
     75        {
     76          if (schemaVersion == 90)
     77          {
     78            Update.updateToBase3(progress, rootLogin, rootPassword);
     79          }
     80          else
     81          {
     82            Update.adjustExistingItems(update, progress, rootLogin, rootPassword);
     83          }
     84        }
     85        progress.setRange(50, 75);
    7486        Install.initDatabase(update, progress, rootLogin, rootPassword);
    7587        progress.setRange(75, 90);
    76         Update.updateDatabase(progress, rootLogin, rootPassword);
     88        if (update) Update.updateDatabase(progress, rootLogin, rootPassword);
    7789        progress.setRange(95, 100);
    7890        progress.display(0, "Installing web application...");
     
    157169    String message =
    158170      "--System information-----------------------------\n" +
    159       "BASE     : " + Application.getMajorVersion() + "." +
    160         Application.getMinorVersion() + "." +
    161         Application.getMaintenanceVersion() + "\n" +
     171      "BASE     : " + Version.getVersion() + "\n" +
    162172      "Database : " + Config.getString("db.url") + "\n" +
    163173      "Dialect  : " + Config.getString("db.dialect") + "\n" +
Note: See TracChangeset for help on using the changeset viewer.