flyway/flyway — pull request #758 by hhamilto (2014-05-15 16:17:15+00:00)
Title: MetaDataTableImpl now uses its own class loader. 

This is useful incase the schema table sql migrations aren't available on the user provided classpath, for example in certain osgi configurations.

OSGi Ex:

MyBundle (uses flyway) Flyway
------------------------------------------------------------------------------------------------------------------
Flyway flyway = new Flyway();
// set the ClassLoader so that flyway
// can find the jdbc drivers and the
// internal migrations
flyway.setClassLoader(
MyClass.class.getClassLoader());
flyway.setDataSource( ... );
flyway.migrate(); -----------------------------------------> Finds empty db
Needs to create the schema_version table
Tries to load classpath resource
("org/flywaydb/core/internal/dbsupport/" + dbSupport.getDbName() + "/createMetaDataTable.sql")
... never resolved because MyBundle doesn't have
that resource on its class path.
But, if we use the class loader OSGi gives flyway
(eg getClass().getClassLoader()), then flyway can
successfully load the sql it needs.

Let me know your thoughts, and I'm happy to modify this in any way if you see problems with it, and thanks again for the sharp tool.