Removed the DBHelper class. We dont need it now. Will be upgrading the DB from gradle using the flyway plugin
This commit is contained in:
@@ -1,29 +0,0 @@
|
||||
package org.mifosplatform.database;
|
||||
import com.googlecode.flyway.core.Flyway;
|
||||
import org.apache.commons.logging.Log;
|
||||
import org.apache.commons.logging.LogFactory;
|
||||
|
||||
import javax.sql.DataSource;
|
||||
|
||||
/**
|
||||
* Use Flyway library to migrate DB schema. Searches for .sql files in the migrate folder.
|
||||
* For more details on this refer to:
|
||||
* http://flywaydb.org/documentation/migration/sql.html
|
||||
*/
|
||||
public class DBMigrationHelper {
|
||||
|
||||
// private static final String DB_CONNECTION_URL = "jdbc:mysql://localhost:3306/mifostenant-default";
|
||||
// private static final String DB_USER = "root";
|
||||
// private static final String DB_PASSWORD = "mysql";
|
||||
|
||||
protected final Log logger = LogFactory.getLog(getClass());
|
||||
|
||||
public void migrateDB(DataSource tenantDataSource){
|
||||
|
||||
logger.info("Checking for DB Schema Migration. Tenant: "+ tenantDataSource);
|
||||
|
||||
Flyway flyway = new Flyway();
|
||||
flyway.setDataSource(tenantDataSource);
|
||||
flyway.migrate();
|
||||
}
|
||||
}
|
||||
-1
@@ -12,7 +12,6 @@ import javax.sql.DataSource;
|
||||
|
||||
import org.apache.tomcat.jdbc.pool.PoolConfiguration;
|
||||
import org.apache.tomcat.jdbc.pool.PoolProperties;
|
||||
import org.mifosplatform.database.DBMigrationHelper;
|
||||
import org.mifosplatform.infrastructure.core.domain.MifosPlatformTenant;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.beans.factory.annotation.Qualifier;
|
||||
|
||||
Reference in New Issue
Block a user