<?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"
	>
<channel>
	<title>Comments on: Agile database schema migration tool for Java</title>
	<atom:link href="http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/</link>
	<description>Rants about Java and other internet technologies by Sam Pullara</description>
	<pubDate>Thu, 20 Nov 2008 09:27:01 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Andrew Eells</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-762</link>
		<dc:creator>Andrew Eells</dc:creator>
		<pubDate>Mon, 29 Sep 2008 19:07:53 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-762</guid>
		<description>I have created and released under the GPL a versioning framework for
database release patching. This has been tested and used in an Agile
development environment with multiple users throughout all stages of
the development lifecycle.

You can find details here: http://www.andrew-eells.com/database-versioning-framework/

I would like to make a section of the development community aware of
this, really to see what response I might get, and possibly to help
anyone who needs a framework for similar purposes.

Please feel free to download and use it within your project team, and
I'd be really grateful for any comments on improvements you think
could be made.

Thanks and regards, Andrew</description>
		<content:encoded><![CDATA[<p>I have created and released under the GPL a versioning framework for<br />
database release patching. This has been tested and used in an Agile<br />
development environment with multiple users throughout all stages of<br />
the development lifecycle.</p>
<p>You can find details here: <a href="http://www.andrew-eells.com/database-versioning-framework/" rel="nofollow">http://www.andrew-eells.com/database-versioning-framework/</a></p>
<p>I would like to make a section of the development community aware of<br />
this, really to see what response I might get, and possibly to help<br />
anyone who needs a framework for similar purposes.</p>
<p>Please feel free to download and use it within your project team, and<br />
I&#8217;d be really grateful for any comments on improvements you think<br />
could be made.</p>
<p>Thanks and regards, Andrew</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-80</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Thu, 14 Feb 2008 17:51:36 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-80</guid>
		<description>The code is maintained at Google Code.  Codehaus only has the code for the plugin because thats the way you distribute plugins using grails -- they are uploaded to the codehaus SVN server.  Anyone who is serious about working on the project only need contact myself and I will add them to the project with their first good patch.</description>
		<content:encoded><![CDATA[<p>The code is maintained at Google Code.  Codehaus only has the code for the plugin because thats the way you distribute plugins using grails &#8212; they are uploaded to the codehaus SVN server.  Anyone who is serious about working on the project only need contact myself and I will add them to the project with their first good patch.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Arnon</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-79</link>
		<dc:creator>Arnon</dc:creator>
		<pubDate>Thu, 14 Feb 2008 17:46:25 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-79</guid>
		<description>Good work Sam.
Where do you maintain it now? There seems to be confusion as to whether it's in google code or codehaus...</description>
		<content:encoded><![CDATA[<p>Good work Sam.<br />
Where do you maintain it now? There seems to be confusion as to whether it&#8217;s in google code or codehaus&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-28</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Sat, 13 Oct 2007 04:47:50 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-28</guid>
		<description>&lt;blockquote&gt;&lt;p&gt;Sounds very similar to autopatch (http://autopatch.sourceforge.net), which i’ve been using for a couple of months on a java web project.  It’s more web app focused, with some nice features like a startup servlet to trigger the migration when you deploy a new version of your app, and a locking table to prevent multiple nodes in a cluster from trying to update simultaneously.  So far the biggest annoyance of autopatch has been that the migrations are one way.  I like the fact that rake migrate lets you downgrade your database so you can re-run the upgrade as you test your app before checking in.&lt;/p&gt;
&lt;/blockquote&gt;

Autopatch actually looks like a really cool generic solution to this problem.  If it had been easy to find perhaps I would not have built this though its probably a bit too generic for most people (but not me).  I've never had an application setup so that I would need to downgrade, instead I always use original data in the tests and have it get upgraded up to current. That makes it a waste to write all that downgrade code, especially when a true downgrade may be impossible (loss of information during migration).</description>
		<content:encoded><![CDATA[<blockquote><p>Sounds very similar to autopatch (http://autopatch.sourceforge.net), which i’ve been using for a couple of months on a java web project.  It’s more web app focused, with some nice features like a startup servlet to trigger the migration when you deploy a new version of your app, and a locking table to prevent multiple nodes in a cluster from trying to update simultaneously.  So far the biggest annoyance of autopatch has been that the migrations are one way.  I like the fact that rake migrate lets you downgrade your database so you can re-run the upgrade as you test your app before checking in.</p>
</blockquote>
<p>Autopatch actually looks like a really cool generic solution to this problem.  If it had been easy to find perhaps I would not have built this though its probably a bit too generic for most people (but not me).  I&#8217;ve never had an application setup so that I would need to downgrade, instead I always use original data in the tests and have it get upgraded up to current. That makes it a waste to write all that downgrade code, especially when a true downgrade may be impossible (loss of information during migration).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-27</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Sat, 13 Oct 2007 04:42:43 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-27</guid>
		<description>&lt;blockquote&gt;&lt;p&gt;Hi Sam,&lt;br&gt;
Just been looking at dbmigrate to handle our database migration issues during development. Looks like a very promising product. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;Thanks, I am obviously still working on it but its working well in its current implementation.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;One area that has me scratching my head a bit is the processing of the scripts. It’s a bit out of sync with the doco, so I’ve been running some tests to see how it works and looking through the source code. I’d like some feedback on the reasoning behind the mirgratefrom- and migrateto- seperating of the classes/scripts. The code says that it looks for the first file from the list and runs just that one. The search order being (ignoring database specific ones which are the same):&lt;/p&gt;
&lt;p&gt;(Class)from(version)&lt;br&gt;
(Sql)from(Version)&lt;br&gt;
(Groovy)from(version)&lt;br&gt;
(Class)to(version+1)&lt;br&gt;
(Sql)to(Version+1)&lt;br&gt;
(Groovy)to(version+1)&lt;/p&gt;
&lt;p&gt;I found this a bit confusing and wondered what the logic behind this is. I also found that if I create a from1, from2, and from3, dbmigrate only runs 1 and 2 when I specify version 3. I tried changing from3 to to3, but because of the from2 script it would not run that either. &lt;/p&gt;
&lt;p&gt;It appears that the logic is that from scripts update from the prior version to the next number, I.e. from2 should contain updates from version 2 to version 3 of the database and the to scripts work in the opposite. But that you must code either from or to scripts, but not both. In which case I’m thinking why not just stick with what the doco says. &lt;/p&gt;
&lt;p&gt;It appears that the best way to code things is to create to1, to2, and to3 as most programmer think in terms of the version number of a file matching the version number in the database. &lt;/p&gt;
&lt;/blockquote&gt;
&lt;p&gt;So here is the deal. The original one had the semantics of 'migratefromN' which is what I need in order to skip versions for when you go GA and you want to update the database in one fell swoop from the previously released version to the latest development version.  The problem is that if you keep track of the version you are going &lt;b&gt;to&lt;/b&gt; you have this problem that you must assume that you are coming from the most immediate previous version.  For all those people out there that want the version of the file to match up with the version of the database you can use 'migratetoN' scripts/classes.  I should really update the documentation but this was after feedback like yours where you want the script version to match the database version it is setting rather than the version it finds in the database.&lt;/p&gt;
&lt;blockquote&gt;
&lt;p&gt;Regards,&lt;br&gt;
Derek&lt;/p&gt;
&lt;p&gt;P.S. What’s the status of the code in terms of contributions from other programmers ? How would we go about it ? and how much time do you expect to put into this project ?&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Right now it is just myself and a couple of others that have worked on before.  If you or someone from your team wants to contribute we can discuss it.  Send me email (sam at sampullara dot com). In terms of time I am going to put into the project -- I would like to limit the scope of it so that in its current form it is almost done and if there is more to it, perhaps make another system that sits on top of it.&lt;/p&gt;</description>
		<content:encoded><![CDATA[<blockquote><p>Hi Sam,<br />
Just been looking at dbmigrate to handle our database migration issues during development. Looks like a very promising product. </p>
</blockquote>
<p>Thanks, I am obviously still working on it but its working well in its current implementation.</p>
<blockquote>
<p>One area that has me scratching my head a bit is the processing of the scripts. It’s a bit out of sync with the doco, so I’ve been running some tests to see how it works and looking through the source code. I’d like some feedback on the reasoning behind the mirgratefrom- and migrateto- seperating of the classes/scripts. The code says that it looks for the first file from the list and runs just that one. The search order being (ignoring database specific ones which are the same):</p>
<p>(Class)from(version)<br />
(Sql)from(Version)<br />
(Groovy)from(version)<br />
(Class)to(version+1)<br />
(Sql)to(Version+1)<br />
(Groovy)to(version+1)</p>
<p>I found this a bit confusing and wondered what the logic behind this is. I also found that if I create a from1, from2, and from3, dbmigrate only runs 1 and 2 when I specify version 3. I tried changing from3 to to3, but because of the from2 script it would not run that either. </p>
<p>It appears that the logic is that from scripts update from the prior version to the next number, I.e. from2 should contain updates from version 2 to version 3 of the database and the to scripts work in the opposite. But that you must code either from or to scripts, but not both. In which case I’m thinking why not just stick with what the doco says. </p>
<p>It appears that the best way to code things is to create to1, to2, and to3 as most programmer think in terms of the version number of a file matching the version number in the database. </p>
</blockquote>
<p>So here is the deal. The original one had the semantics of &#8216;migratefromN&#8217; which is what I need in order to skip versions for when you go GA and you want to update the database in one fell swoop from the previously released version to the latest development version.  The problem is that if you keep track of the version you are going <b>to</b> you have this problem that you must assume that you are coming from the most immediate previous version.  For all those people out there that want the version of the file to match up with the version of the database you can use &#8216;migratetoN&#8217; scripts/classes.  I should really update the documentation but this was after feedback like yours where you want the script version to match the database version it is setting rather than the version it finds in the database.</p>
<blockquote>
<p>Regards,<br />
Derek</p>
<p>P.S. What’s the status of the code in terms of contributions from other programmers ? How would we go about it ? and how much time do you expect to put into this project ?</p>
</blockquote>
<p>Right now it is just myself and a couple of others that have worked on before.  If you or someone from your team wants to contribute we can discuss it.  Send me email (sam at sampullara dot com). In terms of time I am going to put into the project &#8212; I would like to limit the scope of it so that in its current form it is almost done and if there is more to it, perhaps make another system that sits on top of it.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Lorin</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-25</link>
		<dc:creator>Lorin</dc:creator>
		<pubDate>Fri, 12 Oct 2007 13:24:48 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-25</guid>
		<description>Sounds very similar to autopatch (http://autopatch.sourceforge.net), which i've been using for a couple of months on a java web project.  It's more web app focused, with some nice features like a startup servlet to trigger the migration when you deploy a new version of your app, and a locking table to prevent multiple nodes in a cluster from trying to update simultaneously.  So far the biggest annoyance of autopatch has been that the migrations are one way.  I like the fact that rake migrate lets you downgrade your database so you can re-run the upgrade as you test your app before checking in.</description>
		<content:encoded><![CDATA[<p>Sounds very similar to autopatch (http://autopatch.sourceforge.net), which i&#8217;ve been using for a couple of months on a java web project.  It&#8217;s more web app focused, with some nice features like a startup servlet to trigger the migration when you deploy a new version of your app, and a locking table to prevent multiple nodes in a cluster from trying to update simultaneously.  So far the biggest annoyance of autopatch has been that the migrations are one way.  I like the fact that rake migrate lets you downgrade your database so you can re-run the upgrade as you test your app before checking in.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Derek Clarkson</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-24</link>
		<dc:creator>Derek Clarkson</dc:creator>
		<pubDate>Thu, 11 Oct 2007 05:59:36 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-24</guid>
		<description>Hi Sam, 
Just been looking at dbmigrate to handle our database migration issues during development. Looks like a very promising product. 

One area that has me scratching my head a bit is the processing of the scripts. It's a bit out of sync with the doco, so I've been running some tests to see how it works and looking through the source code. I'd like some feedback on the reasoning behind the mirgratefrom- and migrateto- seperating of the classes/scripts. The code says that it looks for the first file from the list and runs just that one. The search order being (ignoring database specific ones which are the same):

(Class)from(version)
(Sql)from(Version)
(Groovy)from(version)
(Class)to(version+1)
(Sql)to(Version+1)
(Groovy)to(version+1)

I found this a bit confusing and wondered what the logic behind this is. I also found that if I create a from1, from2, and from3, dbmigrate only runs 1 and 2 when I specify version 3. I tried changing from3 to to3, but because of the from2 script it would not run that either. 

It appears that the logic is that from scripts update from the prior version to the next number, I.e. from2 should contain updates from version 2 to version 3 of the database and the to scripts work in the opposite. But that you must code either from or to scripts, but not both. In which case I'm thinking why not just stick with what the doco says. 

It appears that the best way to code things is to create to1, to2, and to3 as most programmer think in terms of the version number of a file matching the version number in the database. 

Regards,
Derek

P.S. What's the status of the code in terms of contributions from other programmers ? How would we go about it ? and how much time do you expect to put into this project ?</description>
		<content:encoded><![CDATA[<p>Hi Sam,<br />
Just been looking at dbmigrate to handle our database migration issues during development. Looks like a very promising product. </p>
<p>One area that has me scratching my head a bit is the processing of the scripts. It&#8217;s a bit out of sync with the doco, so I&#8217;ve been running some tests to see how it works and looking through the source code. I&#8217;d like some feedback on the reasoning behind the mirgratefrom- and migrateto- seperating of the classes/scripts. The code says that it looks for the first file from the list and runs just that one. The search order being (ignoring database specific ones which are the same):</p>
<p>(Class)from(version)<br />
(Sql)from(Version)<br />
(Groovy)from(version)<br />
(Class)to(version+1)<br />
(Sql)to(Version+1)<br />
(Groovy)to(version+1)</p>
<p>I found this a bit confusing and wondered what the logic behind this is. I also found that if I create a from1, from2, and from3, dbmigrate only runs 1 and 2 when I specify version 3. I tried changing from3 to to3, but because of the from2 script it would not run that either. </p>
<p>It appears that the logic is that from scripts update from the prior version to the next number, I.e. from2 should contain updates from version 2 to version 3 of the database and the to scripts work in the opposite. But that you must code either from or to scripts, but not both. In which case I&#8217;m thinking why not just stick with what the doco says. </p>
<p>It appears that the best way to code things is to create to1, to2, and to3 as most programmer think in terms of the version number of a file matching the version number in the database. </p>
<p>Regards,<br />
Derek</p>
<p>P.S. What&#8217;s the status of the code in terms of contributions from other programmers ? How would we go about it ? and how much time do you expect to put into this project ?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: sam</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-11</link>
		<dc:creator>sam</dc:creator>
		<pubDate>Tue, 25 Sep 2007 22:21:35 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-11</guid>
		<description>Thanks for the feedback!  My responses to your excellent suggestions:

1) I like this idea.
2) Seems reasonable. That might make it easier to read and understand what would get executed.
3) Now that I have integration with Grails I might add the ability to specify the environment even in the Java version.
4) Actually as of subversion version 40 or so I support Groovy scripts (named like the sql scripts), Java classes (camelCased), and SQL scripts.

Sam</description>
		<content:encoded><![CDATA[<p>Thanks for the feedback!  My responses to your excellent suggestions:</p>
<p>1) I like this idea.<br />
2) Seems reasonable. That might make it easier to read and understand what would get executed.<br />
3) Now that I have integration with Grails I might add the ability to specify the environment even in the Java version.<br />
4) Actually as of subversion version 40 or so I support Groovy scripts (named like the sql scripts), Java classes (camelCased), and SQL scripts.</p>
<p>Sam</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-10</link>
		<dc:creator>John</dc:creator>
		<pubDate>Tue, 25 Sep 2007 22:07:18 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-10</guid>
		<description>Wow, pretty cool.  I work a lot with Rails and migrations, but also still work with projects on a Java stack.  I was considering developing something very similar, some day, but for now have just organized SQL snippets by database, environment, etc.  This doesn't quite do everything I will need, and I actually don't need much yet since I am only dealing with a couple instances.  I will stay tuned for sure.

A couple of thoughts for you moving forward:
 - I think you might want to consider breaking up schema from data.  The data itself might change based on the environment, especially for initial loads.
 - I think separating by database vendor could be done optionally in the naming of the file itself, e.g. migratefrom01_postgres.sql or migratefrom01.sql.  I think it fairly likely that the sql will be independent.
 - I use something like this for a structure
   - schema
     - baseline_schema.sql
     - schema_updates.sql (could be migrations here, further separated by vendor)
   - data
     - dev
       - baseline_data.sql (could also be migrations, the system always does schema then data)
       - data_updates.sql
     - production
...
 - A final nice feature would be to have the system pick up SQL OR Groovy scripts, in case you want to do some serious logic for a migration.

Once again, nice work.

 - John</description>
		<content:encoded><![CDATA[<p>Wow, pretty cool.  I work a lot with Rails and migrations, but also still work with projects on a Java stack.  I was considering developing something very similar, some day, but for now have just organized SQL snippets by database, environment, etc.  This doesn&#8217;t quite do everything I will need, and I actually don&#8217;t need much yet since I am only dealing with a couple instances.  I will stay tuned for sure.</p>
<p>A couple of thoughts for you moving forward:<br />
 - I think you might want to consider breaking up schema from data.  The data itself might change based on the environment, especially for initial loads.<br />
 - I think separating by database vendor could be done optionally in the naming of the file itself, e.g. migratefrom01_postgres.sql or migratefrom01.sql.  I think it fairly likely that the sql will be independent.<br />
 - I use something like this for a structure<br />
   - schema<br />
     - baseline_schema.sql<br />
     - schema_updates.sql (could be migrations here, further separated by vendor)<br />
   - data<br />
     - dev<br />
       - baseline_data.sql (could also be migrations, the system always does schema then data)<br />
       - data_updates.sql<br />
     - production<br />
&#8230;<br />
 - A final nice feature would be to have the system pick up SQL OR Groovy scripts, in case you want to do some serious logic for a migration.</p>
<p>Once again, nice work.</p>
<p> - John</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Nathan Voxland</title>
		<link>http://www.javarants.com/2007/09/09/agile-database-schema-migration-tool-for-java/#comment-8</link>
		<dc:creator>Nathan Voxland</dc:creator>
		<pubDate>Wed, 19 Sep 2007 17:34:50 +0000</pubDate>
		<guid isPermaLink="false">http://javarants.com/wordpress/?p=854#comment-8</guid>
		<description>&lt;blockquote&gt;&lt;blockquote&gt;Checkout Liquibase: &lt;a href="http://www.liquibase.org/" rel="nofollow"&gt;http://www.liquibase.org/&lt;/a&gt;
“LiquiBase is an open source (LGPL), DBMS-independent library for tracking, managing and applying database changes. “
&lt;/blockquote&gt;
I like the backend of this library.  Not too fond of creating XML to do the changes though.  Though one of the uses I see for this is adding migrations to Grails.  Then creating a builder that has a nice DSL and generates the XML configuration files might not be that bad. I’ll check it out, thanks for the link!
&lt;/blockquote&gt;
Hi, I'm one of the developers of LiquiBase and ran across this blog today.  I had actually started making a LiquiBase Grails plug-in as a way to start learing the platform.  It's not very far along so far, but I don't see it as being particularly difficult (time is the main reason it's not far along).  I've had requests for a non-XML DSL for changes in the past and am not against the idea.  We've gone with XML mainly so we can leverage the existing XML parsers and because IDEs have built in XML auto-completion.  There may be a way to combine the two, however.

I agree that some sort of schema migration tool would be a great addition to Grails, but I don't want to double up on the effort.  Let me know if you'd be interested in working together.

Nathan</description>
		<content:encoded><![CDATA[<blockquote><blockquote>Checkout Liquibase: <a href="http://www.liquibase.org/" rel="nofollow">http://www.liquibase.org/</a><br />
“LiquiBase is an open source (LGPL), DBMS-independent library for tracking, managing and applying database changes. “
</p></blockquote>
<p>I like the backend of this library.  Not too fond of creating XML to do the changes though.  Though one of the uses I see for this is adding migrations to Grails.  Then creating a builder that has a nice DSL and generates the XML configuration files might not be that bad. I’ll check it out, thanks for the link!
</p></blockquote>
<p>Hi, I&#8217;m one of the developers of LiquiBase and ran across this blog today.  I had actually started making a LiquiBase Grails plug-in as a way to start learing the platform.  It&#8217;s not very far along so far, but I don&#8217;t see it as being particularly difficult (time is the main reason it&#8217;s not far along).  I&#8217;ve had requests for a non-XML DSL for changes in the past and am not against the idea.  We&#8217;ve gone with XML mainly so we can leverage the existing XML parsers and because IDEs have built in XML auto-completion.  There may be a way to combine the two, however.</p>
<p>I agree that some sort of schema migration tool would be a great addition to Grails, but I don&#8217;t want to double up on the effort.  Let me know if you&#8217;d be interested in working together.</p>
<p>Nathan</p>
]]></content:encoded>
	</item>
</channel>
</rss>
