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:
Khushal Oza
2013-03-29 17:55:49 +05:30
parent 3b041ab507
commit da6ff46f4c
2 changed files with 0 additions and 30 deletions
@@ -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();
}
}
@@ -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;