All Downloads are FREE. Search and download functionalities are using the official Maven repository.

play.db.evolutions.exceptions.InvalidDatabaseRevision Maven / Gradle / Ivy

There is a newer version: 1.5.0
Show newest version
package play.db.evolutions.exceptions;

import play.exceptions.PlayException;

//Exceptions
public class InvalidDatabaseRevision extends PlayException {

    /**
     * The name of the Database concern by the exception
     */
    private String dbName;
    private String evolutionScript;

    public InvalidDatabaseRevision(String dbName, String evolutionScript) {
        this.dbName = dbName;
        this.evolutionScript = evolutionScript;
    }

    public String getDbName() {
        return this.dbName;
    }
    
    public String getEvolutionScript() {
        return evolutionScript;
    }
    
    @Override
    public String getErrorTitle() {
        return "Your database needs evolution!";
    }

    @Override
    public String getErrorDescription() {
        return "An SQL script will be run on your database.";
    }

    @Override
    public String getMoreHTML() {
        return "

This SQL script must be run:

" + evolutionScript + "
"; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy