Solves a problem with using dbt outside of jRuby.
Fixed some broken SQL in DBT migrations.