Package org.cyclos.db

Class DatabaseHistory


  • public class DatabaseHistory
    extends Object
    This class returns the database history, providing access to migration scripts.
    • Constructor Detail

      • DatabaseHistory

        public DatabaseHistory()
    • Method Detail

      • exists

        public boolean exists​(String appVersion)
        Returns whether the given application version exists
      • getApplicationVersions

        public List<String> getApplicationVersions()
        Returns a list with all available application versions
      • getApplicationVersionsToUpgrade

        public List<String> getApplicationVersionsToUpgrade​(String appVersion)
        Returns all versions which needs to be processed for upgrading since the given current version. The current version will be returned as well.
      • getDbVersions

        public List<Integer> getDbVersions​(String appVersion)
        Returns all known database versions for the given application version
      • getLastDbVersion

        public int getLastDbVersion​(String appVersion)
        Returns the last database version for the given application version
      • normalizeVersion

        public String normalizeVersion​(String appVersion)
        Normalizes the given version number to the number of parts handled by the database history scheme, that is, 3