Java Code Examples for org.flywaydb.core.Flyway#setPlaceholderReplacement()

The following examples show how to use org.flywaydb.core.Flyway#setPlaceholderReplacement() . You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: PostgresDataSourceProvider.java    From conductor with Apache License 2.0 6 votes vote down vote up
private void flywayMigrate(DataSource dataSource) {
    boolean enabled = configuration.isFlywayEnabled();
    if (!enabled) {
        logger.debug("Flyway migrations are disabled");
        return;
    }


    Flyway flyway = new Flyway();
    configuration.getFlywayTable().ifPresent(tableName -> {
        logger.debug("Using Flyway migration table '{}'", tableName);
        flyway.setTable(tableName);
    });

    flyway.setLocations(Paths.get("db","migration_postgres").toString());
    flyway.setDataSource(dataSource);
    flyway.setPlaceholderReplacement(false);
    flyway.migrate();
}
 
Example 2
Source File: MySQLDataSourceProvider.java    From conductor with Apache License 2.0 6 votes vote down vote up
private void flywayMigrate(DataSource dataSource) {
    boolean enabled = configuration.isFlywayEnabled();
    if (!enabled) {
        logger.debug("Flyway migrations are disabled");
        return;
    }


    Flyway flyway = new Flyway();
    configuration.getFlywayTable().ifPresent(tableName -> {
        logger.debug("Using Flyway migration table '{}'", tableName);
        flyway.setTable(tableName);
    });

    flyway.setDataSource(dataSource);
    flyway.setPlaceholderReplacement(false);
    flyway.migrate();
}
 
Example 3
Source File: DeployerConfiguration.java    From oneops with Apache License 2.0 5 votes vote down vote up
private DataSource setDataSource(EmbeddedPostgres server) throws Exception {
  PGPoolingDataSource dataSource = new PGPoolingDataSource();
  dataSource.setUser("kloopzcm");
  dataSource.setPassword("testpwd");
  dataSource.setPortNumber(server.getPort());
  dataSource.setDatabaseName("kloopzdb");

  Flyway flyway = new Flyway();
  flyway.setPlaceholderReplacement(false);
  flyway.setLocations("classpath:deployer");
  flyway.setDataSource(dataSource);
  flyway.migrate();

  return dataSource;
}
 
Example 4
Source File: PostgresDAOTestUtil.java    From conductor with Apache License 2.0 5 votes vote down vote up
private void flywayMigrate(DataSource dataSource) {

        Flyway flyway = new Flyway();
        flyway.setLocations(Paths.get("db","migration_postgres").toString());
        flyway.setDataSource(dataSource);
        flyway.setPlaceholderReplacement(false);
        flyway.migrate();
    }
 
Example 5
Source File: MySQLDAOTestUtil.java    From conductor with Apache License 2.0 5 votes vote down vote up
private void flywayMigrate(DataSource dataSource) {

        Flyway flyway = new Flyway();
        flyway.setDataSource(dataSource);
        flyway.setPlaceholderReplacement(false);
        flyway.migrate();
    }