InputStream inputStream = null;
try
{
inputStream = script.getInputStream();
ScriptRunner scriptRunner = new ScriptRunner(dbType);
scriptRunner.execute(connection, new InputStreamReader(inputStream, "UTF-8"));
Validate.isTrue(!connection.isClosed(), "JDBC Connection should not be closed.");
}
catch (IOException e)
{
throw new MigrationException("Error while reading script input stream.", e);