<?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/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
		>
<channel>
	<title>Comments on: Automatically Creating, Loading, and Migrating your Database (with magic!)</title>
	<atom:link href="http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/feed/" rel="self" type="application/rss+xml" />
	<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/</link>
	<description>A chess-playing machine of the late 18th century, promoted as an automaton but later proved a hoax.</description>
	<lastBuildDate>Wed, 08 Feb 2012 17:13:43 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
	<item>
		<title>By: Josh Nichols</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-638</link>
		<dc:creator><![CDATA[Josh Nichols]]></dc:creator>
		<pubDate>Fri, 02 May 2008 12:20:40 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-638</guid>
		<description><![CDATA[This seems like it&#039;d be extremely useful... in development.
 

 
For production, I think capistrano can nicely handle creating/migrating the database. ]]></description>
		<content:encoded><![CDATA[<p>This seems like it&#039;d be extremely useful&#8230; in development.</p>
<p>For production, I think capistrano can nicely handle creating/migrating the database.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2008-04-24 &#124; Libin Pan</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-637</link>
		<dc:creator><![CDATA[links for 2008-04-24 &#124; Libin Pan]]></dc:creator>
		<pubDate>Thu, 24 Apr 2008 06:40:13 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-637</guid>
		<description><![CDATA[[...] almost effortless Â» Automatically Creating, Loading, and Migrating your Database (with magic!) Automatically Creating, Loading, and Migrating your Database (with magic!) (tags: activerecord database rails rubyonrails migrations rake ruby) [...] ]]></description>
		<content:encoded><![CDATA[<p>[...] almost effortless Â» Automatically Creating, Loading, and Migrating your Database (with magic!) Automatically Creating, Loading, and Migrating your Database (with magic!) (tags: activerecord database rails rubyonrails migrations rake ruby) [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: David Mathers</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-636</link>
		<dc:creator><![CDATA[David Mathers]]></dc:creator>
		<pubDate>Sun, 13 Apr 2008 15:36:54 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-636</guid>
		<description><![CDATA[With MySQL you can use:
 

  &lt;a href=&quot;http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock&quot; rel=&quot;nofollow&quot;&gt;http://dev.mysql.com/doc/refman/5.0/en/miscellane...&lt;/a&gt; ]]></description>
		<content:encoded><![CDATA[<p>With MySQL you can use:</p>
<p>  <a href="http://dev.mysql.com/doc/refman/5.0/en/miscellaneous-functions.html#function_get-lock" rel="nofollow">http://dev.mysql.com/doc/refman/5.0/en/miscellane&#8230;</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Al Brown</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-635</link>
		<dc:creator><![CDATA[Al Brown]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 17:14:20 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-635</guid>
		<description><![CDATA[this seems dangerous
 

 
Wouldn&#039;t it be better if the code notified you (by emailing you a report or a URL for it) as to what changes it needs to make and give you the option of approving?  
 

 
In the mean time, your app can make people wait until the db version is correct.  
 

 
Starting your app could also display a message, but with everything automated, you won&#039;t see it.
 

 
I think its best that you avoid depending on this mechanism though.  Your best beat is to establish robust processes that check the db version and do the appropriate thing before restarting your app.  Yes, the above would be cooler of course, but looking goofy to your users just once because of it will wipe out any coolness upgrade it buys you. ]]></description>
		<content:encoded><![CDATA[<p>this seems dangerous</p>
<p>Wouldn&#039;t it be better if the code notified you (by emailing you a report or a URL for it) as to what changes it needs to make and give you the option of approving?  </p>
<p>In the mean time, your app can make people wait until the db version is correct.  </p>
<p>Starting your app could also display a message, but with everything automated, you won&#039;t see it.</p>
<p>I think its best that you avoid depending on this mechanism though.  Your best beat is to establish robust processes that check the db version and do the appropriate thing before restarting your app.  Yes, the above would be cooler of course, but looking goofy to your users just once because of it will wipe out any coolness upgrade it buys you.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Malcontent</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-634</link>
		<dc:creator><![CDATA[Malcontent]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 15:53:47 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-634</guid>
		<description><![CDATA[Rake keeps the latest version in the database, why not do this...
 

 
check if the database exists, if not create it and migreate.
 

 
If the database exists see if the migration tables are there. If not migrate.
 

 
Check latest version from the database and migrate if needed.
 

 
Come to think of it why not migrate if the database exists? What&#039;s the harm in running the migration? ]]></description>
		<content:encoded><![CDATA[<p>Rake keeps the latest version in the database, why not do this&#8230;</p>
<p>check if the database exists, if not create it and migreate.</p>
<p>If the database exists see if the migration tables are there. If not migrate.</p>
<p>Check latest version from the database and migrate if needed.</p>
<p>Come to think of it why not migrate if the database exists? What&#039;s the harm in running the migration?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trevor</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-633</link>
		<dc:creator><![CDATA[Trevor]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 09:58:24 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-633</guid>
		<description><![CDATA[Michael, that&#039;s interesting. Maybe wrapping the entire thing in a transaction wouldn&#039;t be a bad idea. I don&#039;t see how it could hurt... ]]></description>
		<content:encoded><![CDATA[<p>Michael, that&#039;s interesting. Maybe wrapping the entire thing in a transaction wouldn&#039;t be a bad idea. I don&#039;t see how it could hurt&#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Buckbee</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-632</link>
		<dc:creator><![CDATA[Michael Buckbee]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 09:56:38 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-632</guid>
		<description><![CDATA[You could wrap the SQL in a transaction so that only the first mongrel (or whatever you happen to be using) got to it that it would already be taken care of. 
 

 
Even without that, you&#039;d still _probably_ be ok as the subsequent migrations would fail as soon as they hit something that already existed (like trying to add a column that was already there). ]]></description>
		<content:encoded><![CDATA[<p>You could wrap the SQL in a transaction so that only the first mongrel (or whatever you happen to be using) got to it that it would already be taken care of. </p>
<p>Even without that, you&#039;d still _probably_ be ok as the subsequent migrations would fail as soon as they hit something that already existed (like trying to add a column that was already there).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo Urubata</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-631</link>
		<dc:creator><![CDATA[Rodrigo Urubata]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 09:24:09 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-631</guid>
		<description><![CDATA[there is no need to change it for timed migrations because the format used grants a higer number every time :D ]]></description>
		<content:encoded><![CDATA[<p>there is no need to change it for timed migrations because the format used grants a higer number every time <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Rodrigo Urubata</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-630</link>
		<dc:creator><![CDATA[Rodrigo Urubata]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 09:22:59 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-630</guid>
		<description><![CDATA[Great idea :D
 
I liked this initializer :D ]]></description>
		<content:encoded><![CDATA[<p>Great idea <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
<p>I liked this initializer <img src='http://s0.wp.com/wp-includes/images/smilies/icon_biggrin.gif' alt=':D' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Eric</title>
		<link>http://trevorturk.wordpress.com/2008/04/10/automatically-creating-loading-and-migrating-your-database/#comment-629</link>
		<dc:creator><![CDATA[Eric]]></dc:creator>
		<pubDate>Fri, 11 Apr 2008 08:15:50 +0000</pubDate>
		<guid isPermaLink="false">http://almosteffortless.com/?p=674#comment-629</guid>
		<description><![CDATA[Might have to change the regex if you&#039;re using UTC migrations? Maybe go with a time parse or something...
 

  &lt;a href=&quot;http://ryandaigle.com/articles/2008/4/2/what-s-new-in-edge-rails-utc-based-migration-versioning&quot; rel=&quot;nofollow&quot;&gt;http://ryandaigle.com/articles/2008/4/2/what-s-ne...&lt;/a&gt;  

 
Thanks for the Rake trick, btw! ]]></description>
		<content:encoded><![CDATA[<p>Might have to change the regex if you&#039;re using UTC migrations? Maybe go with a time parse or something&#8230;</p>
<p>  <a href="http://ryandaigle.com/articles/2008/4/2/what-s-new-in-edge-rails-utc-based-migration-versioning" rel="nofollow">http://ryandaigle.com/articles/2008/4/2/what-s-ne&#8230;</a>  </p>
<p>Thanks for the Rake trick, btw!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

