play.db
Class Evolutions
java.lang.Object
play.PlayPlugin
play.db.Evolutions
- All Implemented Interfaces:
- java.lang.Comparable<PlayPlugin>
public class Evolutions
- extends PlayPlugin
Handles migration of data.
Does only support the default DBConfig
Methods inherited from class play.PlayPlugin |
addMimeTypes, addTemplateExtensions, afterActionInvocation, afterApplicationStart, afterFixtureLoad, afterInvocation, beforeActionInvocation, beforeDetectingChanges, bind, bind, bind, bindBean, compareTo, compileAll, compileSources, detectChange, detectClassesChange, enhance, getJsonStatus, getMessage, getStatus, invocationFinally, loadTemplate, modelFactory, onActionInvocationResult, onApplicationReady, onApplicationStop, onClassesChange, onConfigurationRead, onEvent, onInvocationException, onInvocationSuccess, onLoad, onRequestRouting, onRoutesLoaded, onTemplateCompilation, overrideTemplateSource, postEvent, routeRequest, runTest, serveStatic, unBind, willBeValidated |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Evolutions
public Evolutions()
main
public static void main(java.lang.String[] args)
throws java.sql.SQLException
- Throws:
java.sql.SQLException
rawInvocation
public boolean rawInvocation(Http.Request request,
Http.Response response)
throws java.lang.Exception
- Description copied from class:
PlayPlugin
- Give a chance to this plugin to fully manage this request
- Overrides:
rawInvocation
in class PlayPlugin
- Parameters:
request
- The Play requestresponse
- The Play response
- Returns:
- true if this plugin has managed this request
- Throws:
java.lang.Exception
beforeInvocation
public void beforeInvocation()
- Description copied from class:
PlayPlugin
- Called before a Play! invocation.
Time to prepare request specific things.
- Overrides:
beforeInvocation
in class PlayPlugin
onApplicationStart
public void onApplicationStart()
- Description copied from class:
PlayPlugin
- Called at application start (and at each reloading)
Time to start stateful things.
- Overrides:
onApplicationStart
in class PlayPlugin
resolve
public static void resolve(int revision)
applyScript
public static boolean applyScript(boolean runScript)
toHumanReadableScript
public static java.lang.String toHumanReadableScript(java.util.List<Evolutions.Evolution> evolutionScript)
checkEvolutionsState
public static void checkEvolutionsState()
getEvolutionScript
public static java.util.List<Evolutions.Evolution> getEvolutionScript()
listApplicationEvolutions
public static java.util.Stack<Evolutions.Evolution> listApplicationEvolutions()
listDatabaseEvolutions
public static java.util.Stack<Evolutions.Evolution> listDatabaseEvolutions()
Guillaume Bort & zenexity - Distributed under Apache 2 licence, without any warrantly