## org.h2.upgrade
Class DbUpgradeNonPageStoreToCurrent

    java.lang.Object
      org.h2.upgrade.DbUpgradeNonPageStoreToCurrent

    public class DbUpgradeNonPageStoreToCurrent

extends java.lang.Object

Class to convert a 1.1 DB (non page store) to a 1.2 DB (page store) format. Conversion is done via "script to" and "runscript from".

Constructor Summary
`DbUpgradeNonPageStoreToCurrent(java.lang.String url, java.util.Properties info)` Converts a database from a 1.1 DB (non page store) to a 1.2 DB (page store) format.

Method Summary
`boolean` `mustBeConverted()` Returns if a database must be converted by this class.
`static void` `setDeleteOldDb(boolean deleteOldDb)` Old files will be renamed to .backup after a successful conversion.
`static void` `setScriptInTmpDir(boolean scriptInTmpDir)` The conversion script file will per default be created in the db directory.
`void` `upgrade()` Converts the database from 1.1 (non page store) to current (page store).
`boolean` `wasSuccessful()` Returns if the database upgrade was successful.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### DbUpgradeNonPageStoreToCurrent

    public DbUpgradeNonPageStoreToCurrent(java.lang.String url,
                                          java.util.Properties info)
                                   throws java.sql.SQLException

  Converts a database from a 1.1 DB (non page store) to a 1.2 DB (page store) format.

  Parameters:
    `url` - The connection string
    `info` - The connection properties
  Throws:
    `java.sql.SQLException` - if an exception occurred

Method Detail

### mustBeConverted

    public boolean mustBeConverted()
                            throws java.sql.SQLException

  Returns if a database must be converted by this class.

  Returns:
    if the conversion classes were found and the database must be converted
  Throws:
    `java.sql.SQLException`

### upgrade

    public void upgrade()
                 throws java.sql.SQLException

  Converts the database from 1.1 (non page store) to current (page store).

  Throws:
    `java.sql.SQLException`

### wasSuccessful

    public boolean wasSuccessful()

  Returns if the database upgrade was successful.

  Returns:
    if the database upgrade was successful

### setScriptInTmpDir

    public static void setScriptInTmpDir(boolean scriptInTmpDir)

  The conversion script file will per default be created in the db directory. Use this method to change the directory to the temp directory.

  Parameters:
    `scriptInTmpDir` - true if the conversion script should be located in the temp directory.

### setDeleteOldDb

    public static void setDeleteOldDb(boolean deleteOldDb)

  Old files will be renamed to .backup after a successful conversion. To delete them after the conversion, use this method with the parameter 'true'.

  Parameters:
    `deleteOldDb` - if true, the old db files will be deleted.