Package io.ebean.migration.auto
Interface AutoMigrationRunner
-
public interface AutoMigrationRunner
Automatically run DB Migrations on application start.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description voidloadProperties(Properties properties)Load configuration properties.voidrun(DataSource dataSource)Run DB migrations using the given DataSource.voidsetDefaultDbSchema(String defaultDbSchema)Set a default DB schema to use.voidsetName(String name)Set the name of the database the migration is run for.
-
-
-
Method Detail
-
setName
void setName(String name)
Set the name of the database the migration is run for.This name can be used when loading properties like:
ebean.${name}.migration.migrationPath
-
setDefaultDbSchema
void setDefaultDbSchema(String defaultDbSchema)
Set a default DB schema to use.This is mostly for Postgres use where the dbSchema matches the DB username. In this case we don't set the current schema as that can mess up the Postgres search path.
-
loadProperties
void loadProperties(Properties properties)
Load configuration properties.
-
run
void run(DataSource dataSource)
Run DB migrations using the given DataSource.
-
-