Package com.example.demo

Source Code of com.example.demo.FlywayDemo4

package com.example.demo;


import javax.sql.DataSource;

import org.postgresql.ds.PGSimpleDataSource;

import com.googlecode.flyway.core.Flyway;

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

  private static DataSource getDataSource() {
    PGSimpleDataSource dataSource = new PGSimpleDataSource();

    dataSource.setServerName("localhost");
    dataSource.setPortNumber(5432);
    dataSource.setDatabaseName("flyway_demos");
    dataSource.setUser("flyway");
    dataSource.setPassword("flyway");
    return dataSource;
  }
}
TOP

Related Classes of com.example.demo.FlywayDemo4

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.