org.dbmaintain.launch.api
Class DbMaintainOperations

java.lang.Object
  extended by org.dbmaintain.launch.api.DbMaintainOperations

public class DbMaintainOperations
extends Object

Class that offers static methods that expose all available DbMaintain operations.

Author:
Filip Neven, Tim Ducheyne

Constructor Summary
DbMaintainOperations()
           
 
Method Summary
static void cleanDatabase()
          Removes the data of all database tables, except for the DBMAINTAIN_SCRIPTS table.
static void clearDatabase()
          Removes all database items, and empties the DBMAINTAIN_SCRIPTS table.
static void createScriptArchive(String archiveFileName)
          Creates an archive file containing all scripts in all configured script locations
static void disableConstraints()
          Disables or drops all foreign key and not null constraints.
static void markDatabaseAsUptodate()
          Marks the database as up-to-date, without executing any script.
static void updateDatabase()
          Updates the database to the latest version.
static void updateSequences()
          Updates all sequences and identity columns to a minimum value.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DbMaintainOperations

public DbMaintainOperations()
Method Detail

createScriptArchive

public static void createScriptArchive(String archiveFileName)
Creates an archive file containing all scripts in all configured script locations

Parameters:
archiveFileName - The name of the archive file to create

updateDatabase

public static void updateDatabase()
Updates the database to the latest version.


markDatabaseAsUptodate

public static void markDatabaseAsUptodate()
Marks the database as up-to-date, without executing any script. You can use this operation to prepare an existing database to be managed by DbMaintain, or after having manually fixed a problem.


clearDatabase

public static void clearDatabase()
Removes all database items, and empties the DBMAINTAIN_SCRIPTS table.


cleanDatabase

public static void cleanDatabase()
Removes the data of all database tables, except for the DBMAINTAIN_SCRIPTS table.


disableConstraints

public static void disableConstraints()
Disables or drops all foreign key and not null constraints.


updateSequences

public static void updateSequences()
Updates all sequences and identity columns to a minimum value.



Copyright © 2011. All Rights Reserved.