<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Liquibase Incremental DB Diff</title>
	<atom:link href="http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/</link>
	<description>Ninja Coding Monkey goes Canada</description>
	<lastBuildDate>Wed, 26 May 2010 19:12:54 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Jakob Külzer</title>
		<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/comment-page-1/#comment-8944</link>
		<dc:creator>Jakob Külzer</dc:creator>
		<pubDate>Wed, 27 Jan 2010 21:23:01 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=1112#comment-8944</guid>
		<description>Agreed, the script is not very flexible but it could easily be improved.

It still requires the user to manually modify the datasources though, because Liquibase is kind of sensitive to different databases. E.g. diff&#039;ing an HSQLDB database against a MySQL database will not go well. 

I like the above approach, injecting the configuration during runtime, but it still leaves the question of how to get the database driver right... 

Ideas?</description>
		<content:encoded><![CDATA[<p>Agreed, the script is not very flexible but it could easily be improved.</p>
<p>It still requires the user to manually modify the datasources though, because Liquibase is kind of sensitive to different databases. E.g. diff&#8217;ing an HSQLDB database against a MySQL database will not go well. </p>
<p>I like the above approach, injecting the configuration during runtime, but it still leaves the question of how to get the database driver right&#8230; </p>
<p>Ideas?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: diffing</title>
		<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/comment-page-1/#comment-8942</link>
		<dc:creator>diffing</dc:creator>
		<pubDate>Wed, 27 Jan 2010 20:52:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=1112#comment-8942</guid>
		<description>previous suggestion won&#039;t work for external configurations specified on classpath (needs to be modified).</description>
		<content:encoded><![CDATA[<p>previous suggestion won&#8217;t work for external configurations specified on classpath (needs to be modified).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: diffing</title>
		<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/comment-page-1/#comment-8863</link>
		<dc:creator>diffing</dc:creator>
		<pubDate>Sat, 23 Jan 2010 02:07:51 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=1112#comment-8863</guid>
		<description>Great stuff.  This is exactly what I was hoping for.

However, like the original DbDiff.groovy script this does not seem to work with external configurations -- i.e. the expected DataSource.groovy does not contain the environment settings (instead they are in an external file located at grails.config.locations -- or in this case it does not exist at all).

line:

    def testConfig = testConfigSlurper.parse(classLoader.loadClass(&quot;DataSource&quot;))


changed to lines:

    def testConfig
    try {
        testConfig = testConfigSlurper.parse(classLoader.loadClass(&quot;DataSource&quot;))
    }
    catch (e) {}

    if ( testConfig != null ) {
        config.grails.config.locations.each({ testConfig.merge(testConfigSlurper.parse(new File(it.split(&quot;:&quot;)[1]).toURL())) })
    } else {
        testConfig = config.grails.config.locations.inject(new ConfigObject()) { aNewConfig, item -&gt; aNewConfig.merge(testConfigSlurper.parse(new File(item.split(&quot;:&quot;)[1]).toURL())) }
    }

Seems to work.</description>
		<content:encoded><![CDATA[<p>Great stuff.  This is exactly what I was hoping for.</p>
<p>However, like the original DbDiff.groovy script this does not seem to work with external configurations &#8212; i.e. the expected DataSource.groovy does not contain the environment settings (instead they are in an external file located at grails.config.locations &#8212; or in this case it does not exist at all).</p>
<p>line:</p>
<p>    def testConfig = testConfigSlurper.parse(classLoader.loadClass(&#8220;DataSource&#8221;))</p>
<p>changed to lines:</p>
<p>    def testConfig<br />
    try {<br />
        testConfig = testConfigSlurper.parse(classLoader.loadClass(&#8220;DataSource&#8221;))<br />
    }<br />
    catch (e) {}</p>
<p>    if ( testConfig != null ) {<br />
        config.grails.config.locations.each({ testConfig.merge(testConfigSlurper.parse(new File(it.split(&#8220;:&#8221;)[1]).toURL())) })<br />
    } else {<br />
        testConfig = config.grails.config.locations.inject(new ConfigObject()) { aNewConfig, item -&gt; aNewConfig.merge(testConfigSlurper.parse(new File(item.split(&#8220;:&#8221;)[1]).toURL())) }<br />
    }</p>
<p>Seems to work.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
