Class FlywayModule

java.lang.Object
io.jooby.flyway.FlywayModule
All Implemented Interfaces:
Extension

public class FlywayModule extends Object implements Extension
Flyway database migration module: https://jooby.io/modules/flyway.

Usage:

- Add hikari and flyway dependency

- Install them


 {
   install(new HikariModule());

   install(new FlywayModule());
 }
 
The default command is migrate which is controlled by the flyway.run application configuration property.

You can specify multiple commands: flyway.run = [clean, migrate] Complete documentation is available at: https://jooby.io/modules/flyway.

Since:
2.0.0
Author:
edgar
  • Constructor Details

    • FlywayModule

      public FlywayModule(@NonNull String name)
      Creates a new Flyway module.
      Parameters:
      name - The name/key of the data source to attach.
    • FlywayModule

      public FlywayModule()
      Creates a new Flyway module. Use the default/first datasource and register objects using the db key.
  • Method Details