Package com.googlecode.flyway.core

Examples of com.googlecode.flyway.core.Flyway.migrate()


    flyway.setInitOnMigrate(true);
    flyway.setDataSource(dataSource());
    String locationsValue = env.getProperty("flyway.migrations.location");
    String[] locations = locationsValue.split("\\s*,\\s*");
    flyway.setLocations(locations);
    flyway.migrate();
    return flyway;
  }

  @Bean
  public JpaTransactionManager transactionManager() {
View Full Code Here


  private static void initFlyway(DataSource dataSource) {
    final Flyway flyway = new Flyway();
    flyway.setInitOnMigrate(true);
    flyway.setDataSource(dataSource);
    flyway.setLocations("db/migration/hsqldb");
    flyway.migrate();
  }

  @SuppressWarnings({ "rawtypes", "unchecked" })
  private static EntityManager entityManager(DataSource dataSource) {
    LocalContainerEntityManagerFactoryBean emfBean = new LocalContainerEntityManagerFactoryBean();
View Full Code Here

      @Override
      public void execute(DataSource ds) {
        Flyway flyway = new Flyway();
        flyway.setDataSource(ds);
        flyway.setLocations(locations);
        flyway.migrate();
      }
    });
  }
 
  /**
 
View Full Code Here

      @Override
      public void execute(DataSource ds) {
        Flyway flyway = new Flyway();
        flyway.setDataSource(ds);
        flyway.setLocations(locations);
        flyway.migrate();
      }
    });
  }
 
  /**
 
View Full Code Here

            // get a fresh database.
            if (ninjaProperties.isTest()) {
                flyway.clean();
            }
           
            flyway.migrate();
           
        }
       
    }
View Full Code Here

  public static void main(String[] args)
  {
    Flyway flyway = new Flyway();
    flyway.setDataSource(getDataSource());
    flyway.setSchemas("demo2");
    flyway.migrate();
   
    System.out.println("+++ DEMO END");
  }

  private static DataSource getDataSource() {
View Full Code Here

      @Override
      public void execute(DataSource ds) {
        Flyway flyway = new Flyway();
        flyway.setDataSource(ds);
        flyway.setLocations(locations);
        flyway.migrate();
      }
    });
  }
 
  /**
 
View Full Code Here

                final Flyway flyway = new Flyway();
                flyway.setDataSource(tenant.databaseURL(), tenant.getSchemaUsername(), tenant.getSchemaPassword());
                flyway.setLocations("sql/migrations/core_db");
                flyway.setOutOfOrder(true);
                try {
      flyway.migrate();
                } catch (FlywayException e) {
          String betterMessage = e.getMessage()
              + "; for Tenant DB URL: " + tenant.databaseURL()
              + ", username: " + tenant.getSchemaUsername();
          throw new FlywayException(betterMessage, e.getCause());
View Full Code Here

  private void upgradeTenantDB() {
    final Flyway flyway = new Flyway();
    flyway.setDataSource(tenantDataSource);
    flyway.setLocations("sql/migrations/list_db");
    flyway.setOutOfOrder(true);
    flyway.migrate();

    tenantDataSourcePortFixService.fixUpTenantsSchemaServerPort();
  }
}
View Full Code Here

  public static void main(String[] args)
  {
    Flyway flyway = new Flyway();
    flyway.setDataSource(getDataSource());
    flyway.setSchemas("demo2");
    flyway.migrate();
   
    System.out.println("+++ DEMO END");
  }

  private static DataSource getDataSource() {
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.