<?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>Fri, 01 Jul 2011 11:20:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.3</generator>
	<item>
		<title>By: Liquibase! (Part 2) &#124; Cantina Consulting</title>
		<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/comment-page-1/#comment-13071</link>
		<dc:creator>Liquibase! (Part 2) &#124; Cantina Consulting</dc:creator>
		<pubDate>Tue, 02 Nov 2010 11:51:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=1112#comment-13071</guid>
		<description>[...] some code. The dbdiff script we&#8217;ve been using is based on work done by Jakob Külzer , and many thanks to him for the idea. We&#8217;ve augmented his idea such that instead of using [...]</description>
		<content:encoded><![CDATA[<p>[...] some code. The dbdiff script we&#8217;ve been using is based on work done by Jakob Külzer , and many thanks to him for the idea. We&#8217;ve augmented his idea such that instead of using [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Liquibase! (A brief primer on database schema migrations in Grails) &#124; Cantina Consulting</title>
		<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/comment-page-1/#comment-12019</link>
		<dc:creator>Liquibase! (A brief primer on database schema migrations in Grails) &#124; Cantina Consulting</dc:creator>
		<pubDate>Fri, 03 Sep 2010 16:04:29 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=1112#comment-12019</guid>
		<description>[...] be a problem. For flexibility we&#8217;ve added a custom environment and a new script (based off of this idea). The script compares your dev and custom environments against one another and prints out the [...]</description>
		<content:encoded><![CDATA[<p>[...] be a problem. For flexibility we&#8217;ve added a custom environment and a new script (based off of this idea). The script compares your dev and custom environments against one another and prints out the [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Justin Miranda</title>
		<link>http://www.jakusys.de/blog/2009/12/liquibase-incremental-db-diff/comment-page-1/#comment-11749</link>
		<dc:creator>Justin Miranda</dc:creator>
		<pubDate>Sat, 14 Aug 2010 01:35:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.jakusys.de/blog/?p=1112#comment-11749</guid>
		<description>Thanks for the great posts -- I&#039;ve been extracting a lot of good bits of information from your Grails/Liquibase posts.  I&#039;m having some difficulty with the diff process (using the Liquibase db-diff or your script).  I want to be able to run the &#039;dev&#039; database using dbCreate = &#039;create-drop&#039; so that I can make changes to the domain and then, every once in a while, run the db-diff script to figure out what&#039;s changed and add that to my changelog.  However, what I&#039;ve noticed is that the db-diff creates a huge number of changesets for dropping/creating foreign key constraints.  This is obviously due to the fact that the &quot;create-drop&quot; will re-create the foreign key indices (with an auto-generated name) each time.  So how do you get a reasonable diff if 90% of the changesets are garbage.  Do you just parse through the changesets and grab the ones that you want to include in your changelog?</description>
		<content:encoded><![CDATA[<p>Thanks for the great posts &#8212; I&#8217;ve been extracting a lot of good bits of information from your Grails/Liquibase posts.  I&#8217;m having some difficulty with the diff process (using the Liquibase db-diff or your script).  I want to be able to run the &#8216;dev&#8217; database using dbCreate = &#8216;create-drop&#8217; so that I can make changes to the domain and then, every once in a while, run the db-diff script to figure out what&#8217;s changed and add that to my changelog.  However, what I&#8217;ve noticed is that the db-diff creates a huge number of changesets for dropping/creating foreign key constraints.  This is obviously due to the fact that the &#8220;create-drop&#8221; will re-create the foreign key indices (with an auto-generated name) each time.  So how do you get a reasonable diff if 90% of the changesets are garbage.  Do you just parse through the changesets and grab the ones that you want to include in your changelog?</p>
]]></content:encoded>
	</item>
	<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>

